youtube

YouTube Data API to crawl all comments and replies

允我心安 提交于 2021-01-18 06:52:50
问题 I have been desperately seeking a solution to crawl all comments and corresponding replies for my research. Am having a very hard time creating a data frame that includes comment data in correct and corresponding orders. I am gonna share my code here so you professionals can take a look and give me some insights. def get_video_comments(service, **kwargs): comments = [] results = service.commentThreads().list(**kwargs).execute() while results: for item in results['items']: comment = item[

How to listen to time change events with the YouTube IFrame Player API?

▼魔方 西西 提交于 2021-01-07 01:30:36
问题 I couldn't find any way to listen to time changes (so I can show a current time/duration of the video in my UI) on the YouTube IFrame Player API documentation. Is there a way to do this without polling getCurrentTime() ? 回答1: The YouTube IFrame Player API doesn't expose any way to listen for time change updates, but since internally it uses postMessage events to communicate between the IFrame and the main window, you can add a listener to your window to listen to them and react only to the

How to listen to time change events with the YouTube IFrame Player API?

穿精又带淫゛_ 提交于 2021-01-07 01:25:19
问题 I couldn't find any way to listen to time changes (so I can show a current time/duration of the video in my UI) on the YouTube IFrame Player API documentation. Is there a way to do this without polling getCurrentTime() ? 回答1: The YouTube IFrame Player API doesn't expose any way to listen for time change updates, but since internally it uses postMessage events to communicate between the IFrame and the main window, you can add a listener to your window to listen to them and react only to the

Youtube embed video start and end problem

守給你的承諾、 提交于 2021-01-04 10:14:54
问题 Youtube has a feature when you can embed a video and mark start and end time with it. It displays a frame on the seek bar and video starts from the starting mark and ends at the ending mark. It stopped working a few weeks ago. https://www.youtube.com/embed/h_8smKNoAAw?start=2285&end=2515 Here is a url that I am sure was working before. Now it starts from point marked in the url, but it does not end at the ending mark. 回答1: It just worked well for me. I added the autoplay=1 parameter in the

Youtube_dl : ERROR : YouTube said: Unable to extract video data

北慕城南 提交于 2021-01-02 05:35:43
问题 I'm making a little graphic interface with Python 3 which should download a youtube video with it URL. I use for that the module youtube_dl. This is my code : import youtube_dl # Youtube_dl is used for download the video ydl_opt = {"outtmpl" : "/videos/%(title)s.%(ext)s", "format": "bestaudio/best"} # Here we give some advanced settings. outtmpl is used to define the path of the video that we are going to download def operation(link): """ Start the download operation """ try: with youtube_dl

Youtube API - Get top comments from a video

我与影子孤独终老i 提交于 2020-12-31 17:40:29
问题 Is it possible to get the top comments from a video? Maybe sorted by number of thumbs up? This is my current url: http://gdata.youtube.com/feeds/api/videos/'+yt_id+'/comments?alt=json-in-script&callback=?&max-results=50 Thanks in advance! Peter 回答1: Unfortunately, i think there is no such option. You can´t (or i didn´t manage to get it working) order by rating, likes etc. of comment, because there is no gdata-tag like "rating" etc. for comments. YouTube doesn´t provide this so far. You can

Youtube API - Get top comments from a video

爱⌒轻易说出口 提交于 2020-12-31 17:39:05
问题 Is it possible to get the top comments from a video? Maybe sorted by number of thumbs up? This is my current url: http://gdata.youtube.com/feeds/api/videos/'+yt_id+'/comments?alt=json-in-script&callback=?&max-results=50 Thanks in advance! Peter 回答1: Unfortunately, i think there is no such option. You can´t (or i didn´t manage to get it working) order by rating, likes etc. of comment, because there is no gdata-tag like "rating" etc. for comments. YouTube doesn´t provide this so far. You can

Youtube API - Get top comments from a video

时光总嘲笑我的痴心妄想 提交于 2020-12-31 17:33:36
问题 Is it possible to get the top comments from a video? Maybe sorted by number of thumbs up? This is my current url: http://gdata.youtube.com/feeds/api/videos/'+yt_id+'/comments?alt=json-in-script&callback=?&max-results=50 Thanks in advance! Peter 回答1: Unfortunately, i think there is no such option. You can´t (or i didn´t manage to get it working) order by rating, likes etc. of comment, because there is no gdata-tag like "rating" etc. for comments. YouTube doesn´t provide this so far. You can