To watch videos on YouTube from different devices and not be tied to a local computer, I put the site online:
http://memtube.com
And I watch everything from there.
Who has the desire, please join. On the website at any time you can download an Excel file with the history of views:
curl 'https://www.googleapis.com/youtube/v3/channels?part=snippet&id=UC640y4UvDAlya_WOj5U4pfA&key=__API'
{ "kind": "youtube#channelListResponse", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/YqjVAeQ4_JORc2ijoBKla3hrDXE\"", "pageInfo": { "totalResults": 1, "resultsPerPage": 1 }, "items": [ { "kind": "youtube#channel", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/OE6leaeClJlkthEEiPP5KVJQZPQ\"", "id": "UC640y4UvDAlya_WOj5U4pfA", "snippet": { "title": "nptelhrd", "description": "Your favorite courses available for certification! study, write an exam and get a certificate from the IITs! Check http://nptel.ac.in/noc\n\nThis channel provides technical lectures from seven Indian Institutes of Technology (IITs) and Indian Institute of Science (IISc) Bangalore.\n\nPlease visit the NPTEL Channel List below to view the complete list of courses. (24 Channels)", "publishedAt": "2007-11-28T04:54:13.000Z", "thumbnails": { "default": { "url": "https://yt3.ggpht.com/-VO_A5Tys4WY/AAAAAAAAAAI/AAAAAAAAAAA/mBvvbUvh0A8/s88-ck-no/photo.jpg" }, "medium": { "url": "https://yt3.ggpht.com/-VO_A5Tys4WY/AAAAAAAAAAI/AAAAAAAAAAA/mBvvbUvh0A8/s240-ck-no/photo.jpg" }, "high": { "url": "https://yt3.ggpht.com/-VO_A5Tys4WY/AAAAAAAAAAI/AAAAAAAAAAA/mBvvbUvh0A8/s240-ck-no/photo.jpg" } }, "localized": { "title": "nptelhrd", "description": "Your favorite courses available for certification! study, write an exam and get a certificate from the IITs! Check http://nptel.ac.in/noc\n\nThis channel provides technical lectures from seven Indian Institutes of Technology (IITs) and Indian Institute of Science (IISc) Bangalore.\n\nPlease visit the NPTEL Channel List below to view the complete list of courses. (24 Channels)" } } } ] }
curl 'https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCEBb1b_L6zDS3xTUrIALZOw&order=date&key=__API'
{ "kind": "youtube#searchListResponse", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/vGlosUUKRoHE50sX08btNSJuUT0\"", "nextPageToken": "CAUQAA", "pageInfo": { "totalResults": 3493, "resultsPerPage": 5 }, "items": [ { "kind": "youtube#searchResult", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/f-Aj24y6ay5s_ofPTa82fwx3hP0\"", "id": { "kind": "youtube#video", "videoId": "NtMOab_nhs0" }, "snippet": { "publishedAt": "2015-04-02T00:35:45.000Z", "channelId": "UCEBb1b_L6zDS3xTUrIALZOw", "title": "Octave/MATLAB for Beginners, Part 2: Fitting Data and Plotting", "description": "MIT 22.15 Essential Numerical Methods, Fall 2014 View the complete course: http://ocw.mit.edu/22-15F14 Instructor: Ian Hutchinson Plotting the line that results ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/NtMOab_nhs0/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/NtMOab_nhs0/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/NtMOab_nhs0/hqdefault.jpg" } }, "channelTitle": "MIT", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/qLJGwF303RMmdl03IbivB2VkIQ4\"", "id": { "kind": "youtube#video", "videoId": "WUxImdA7k8E" }, "snippet": { "publishedAt": "2015-04-02T00:35:45.000Z", "channelId": "UCEBb1b_L6zDS3xTUrIALZOw", "title": "Octave/MATLAB for Beginners, Part 3: Cleaning Up & Saving Plots", "description": "MIT 22.15 Essential Numerical Methods, Fall 2014 View the complete course: http://ocw.mit.edu/22-15F14 Instructor: Ian Hutchinson Cleaning up and saving ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/WUxImdA7k8E/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/WUxImdA7k8E/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/WUxImdA7k8E/hqdefault.jpg" } }, "channelTitle": "MIT", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/mKjnuWcbJIZE_fKn12kg7B-lrN0\"", "id": { "kind": "youtube#video", "videoId": "LhPZwdhutgU" }, "snippet": { "publishedAt": "2015-04-02T00:35:45.000Z", "channelId": "UCEBb1b_L6zDS3xTUrIALZOw", "title": "Octave/MATLAB for Beginners, Part 1: Starting from Scratch", "description": "MIT 22.15 Essential Numerical Methods, Fall 2014 View the complete course: http://ocw.mit.edu/22-15F14 Instructor: Ian Hutchinson Create adjacent windows ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/LhPZwdhutgU/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/LhPZwdhutgU/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/LhPZwdhutgU/hqdefault.jpg" } }, "channelTitle": "MIT", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/EteK6EKK5CG4IAAX3JjzWUD0oAQ\"", "id": { "kind": "youtube#playlist", "playlistId": "PLUl4u3cNGP63_OOz8w5qDEoqErZ8Hj-fc" }, "snippet": { "publishedAt": "2015-04-02T00:34:03.000Z", "channelId": "UCEBb1b_L6zDS3xTUrIALZOw", "title": "MIT 22.15 Essential Numerical Methods, Fall 2014", "description": "View the complete course: http://ocw.mit.edu/22-15F14 Instructor: Ian Hutchinson Three short tutorial videos which demonstrate basic operation of Octave software, used in this graduate-level...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/LhPZwdhutgU/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/LhPZwdhutgU/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/LhPZwdhutgU/hqdefault.jpg" } }, "channelTitle": "MIT", "liveBroadcastContent": "none" } }, { "kind": "youtube#searchResult", "etag": "\"kYnGHzMaBhcGeLrcKRx6PAIUosY/jI4Bwr7emgpt45cnFetFPewI7qU\"", "id": { "kind": "youtube#playlist", "playlistId": "PLUl4u3cNGP62FPGcyFJkzhqq9c5cHCK32" }, "snippet": { "publishedAt": "2015-03-23T21:38:55.000Z", "channelId": "UCEBb1b_L6zDS3xTUrIALZOw", "title": "MIT 8.421 Atomic and Optical Physics I, Spring 2014", "description": "MIT 8.421 Atomic and Optical Physics I, Spring 2014 View the complete course: http://ocw.mit.edu/8-421S14 Instructor: Wolfgang Ketterle This is the first of a ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/iwQ49oG-DO8/default.jpg" }, "medium": { "url": "https://i.ytimg.com/vi/iwQ49oG-DO8/mqdefault.jpg" }, "high": { "url": "https://i.ytimg.com/vi/iwQ49oG-DO8/hqdefault.jpg" } }, "channelTitle": "MIT", "liveBroadcastContent": "none" } } ] }
curl 'https://ww.googleapis.com/youtube/v3/videos?part=snippet&id=EhNWzcUwqGbI&key=__API'
{ "kind": "youtube#videoListResponse", "etag": "\"IHLB7Mi__JPvvG2zLQWAg8l36UU/2kAxpYyny-CEVVbQ2cOjO-XSscQ\"", "pageInfo": { "totalResults": 1, "resultsPerPage": 1 }, "items": [ { "kind": "youtube#video", "etag": "\"IHLB7Mi__JPvvG2zLQWAg8l36UU/vAIAewyN9KKpNPERU4b4tOjuPL4\"", "id": "EhNWzcUqGbI", "snippet": { "publishedAt": "2013-03-16T06:58:52.000Z", "channelId": "UCuLLf8HBxpa-RV1sf9CRmDg", "title": "50 MPH 52v Electric Mountain Bike", "description": "http://voltbicycles.com This is our Alite 1000 Electric Mountain bike powered by a black lighting brushless rear hub electric motor with a 52v battery system. This electric bike will do around 50 MPH and will run 30+ miles on a single charge. \n\nGOING GREEN DOESN'T HAVE TO BE BORING", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/EhNWzcUqGbI/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/EhNWzcUqGbI/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/EhNWzcUqGbI/hqdefault.jpg", "width": 480, "height": 360 }, "standard": { "url": "https://i.ytimg.com/vi/EhNWzcUqGbI/sddefault.jpg", "width": 640, "height": 480 }, "maxres": { "url": "https://i.ytimg.com/vi/EhNWzcUqGbI/maxresdefault.jpg", "width": 1280, "height": 720 } }, "channelTitle": "bradscottphotography", "categoryId": "28", "liveBroadcastContent": "none", "localized": { "title": "50 MPH 52v Electric Mountain Bike", "description": "http://voltbicycles.com This is our Alite 1000 Electric Mountain bike powered by a black lighting brushless rear hub electric motor with a 52v battery system. This electric bike will do around 50 MPH and will run 30+ miles on a single charge. \n\nGOING GREEN DOESN'T HAVE TO BE BORING" } } } ] }
use strict; use warnings; use utf8; use Mojo::DOM; use File::Slurp; use feature 'say'; my $body = read_file( 'youtube_history.html', binmode => ':utf8' ); my $dom = Mojo::DOM->new($body); for my $e ( $dom->find('div.yt-uix-tile')->each ) { say $e->{'data-context-item-id'}; }
python main.py
* Running on http://0.0.0.0:5000/ * Restarting with reloader
Source: https://habr.com/ru/post/255549/
All Articles