cob007 19 Posted February 21, 2016 Report Share Posted February 21, 2016 Hello, This was the original command to scrape youtube API which used to work before youtube decided to stop API-2.Although I replaced http://gdata.youtube.com/feeds/api/videoswith "https://www.googleapis.com/youtube/v3" even that didn't help to scrape the titles, views,likes and comments. I guess its more of problem with youtube API than regular expression used here. define GET VIDEO TITLE { set(#logtext,"[{$find regular expression($date,"\\d+:\\d+:\\d+")}]Getting title, views, likes and comments of video: {$plugin function("LocalDictionary.dll", "$local dictionary get", "video id")}<br>","Global") navigate("http://gdata.youtube.com/feeds/api/videos/{$ /{$plugin function("LocalDictionary.dll", "$local dictionary get", "video id")}?v=2&alt=json","Wait") save to file("C:\\1.csv.txt",$document text) plugin command("LocalDictionary.dll", "local dictionary add", "video html", $document text) plugin command("LocalDictionary.dll", "local dictionary add", "video title", $find regular expression($plugin function("LocalDictionary.dll", "$local dictionary get", "video html"),"(?<=\"title\":\\\{\"\\$t\":\").*?(?=\")")) set table cell(&table,$plugin function("LocalDictionary.dll", "$local dictionary get", "thread row"),2,"<td>{$plugin function("LocalDictionary.dll", "$local dictionary get", "video title")}</td>") plugin command("LocalDictionary.dll", "local dictionary add", "views", $replace($find regular expression($plugin function("LocalDictionary.dll", "$local dictionary get", "video html"),"(?<=viewCount\":\").*?(?=\")"),".","")) plugin command("LocalDictionary.dll", "local dictionary add", "likes", $replace($find regular expression($plugin function("LocalDictionary.dll", "$local dictionary get", "video html"),"(?<=\"numLikes\":\").*?(?=\")"),".","")) plugin command("LocalDictionary.dll", "local dictionary add", "comments", $find regular expression($plugin function("LocalDictionary.dll", "$local dictionary get", "video html"),"(?<=\"countHint\":)\\d+")) set table cell(&table,$plugin function("LocalDictionary.dll", "$local dictionary get", "thread row"),4,"<td>{$plugin function("LocalDictionary.dll", "$local dictionary get", "views")}</td>") set table cell(&table,$plugin function("LocalDictionary.dll", "$local dictionary get", "thread row"),5,"<td>{$plugin function("LocalDictionary.dll", "$local dictionary get", "likes")}</td>") set table cell(&table,$plugin function("LocalDictionary.dll", "$local dictionary get", "thread row"),6,"<td>{$plugin function("LocalDictionary.dll", "$local dictionary get", "comments")}</td>")} Quote Link to post Share on other sites
abbas786 78 Posted February 21, 2016 Report Share Posted February 21, 2016 Hey Bud, It is not simple like previous Youtube API , you cant directly access the V3 API without implementing OAuth 2.0 !. Please Check this url https://developers.google.com/youtube/v3/getting-started. Best Regards Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.