本文介绍了如何将YouTube的“喜欢和不喜欢"以及YouTube的比率导入到Google表格中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何将视频中的YouTube喜欢和不喜欢的内容导入Google表格?
How would I import YouTube likes and dislikes from a video onto Google Sheets?
推荐答案
标题:
=IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","//*[@id='eow-title']")
观看次数:
=VALUE(REGEXREPLACE(TEXT(IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo",
"//*[contains(@class, 'watch-view-count')]"),0)," view(s)?",""))
持续时间:
=SUBSTITUTE(REGEXREPLACE(IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","//*[@itemprop='duration']/@content"),"PT|S",""),"M",":")
赞:
=IF(ISNA(IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","(//*[contains(@class,'like-button-renderer-like-button')])[1]"))=TRUE,0,
IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","(//*[contains(@class,'like-button-renderer-like-button')])[1]"))
DISLIKES:
=IF(ISNA(IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","(//*[contains(@class,'like-button-renderer-dislike-button')])[1]"))=TRUE,0,
IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo","(//*[contains(@class,'like-button-renderer-dislike-button')])[1]"))
已上传:
=REGEXREPLACE(IMPORTXML("https://www.youtube.com/watch?v=MkgR0SxmMKo",
"//*[contains(@class, 'watch-time-text')]"),"((Uploaded)|(Published)|(Streamed live)) on ","")
订阅:
=IFERROR(MID(QUERY(IMPORTXML("https://www.youtube.com/channel/"&A1,
"//div[@class='primary-header-actions']"), "select Col1"), 31, 20), )
=INDEX(IMPORTHTML("https://www.youtube.com/channel/UC7_gcs09iThXybpVgjHZ_7g","list",1),1,1)
频道ID:
=ARRAYFORMULA(REGEXREPLACE(QUERY(SUBSTITUTE(ARRAY_CONSTRAIN(
IMPORTDATA(https://www.youtube.com/watch?v=rckrnYw5sOA), 3000, 1), """", ""),
"where Col1 contains '<meta itemprop=channelId content='"),
"<meta itemprop=channelId content=|>", ""))
这篇关于如何将YouTube的“喜欢和不喜欢"以及YouTube的比率导入到Google表格中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!