aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/yt_data_extract/watch_extraction.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix (dis)like, music list extraction due to YouTube changes (again)James Taylor2021-08-091-4/+27
| | | | | | | | | | | | | | | YouTube reverted the changes they made that prompted f9f5d5ba. In case they change their minds again, this adds support for both formats. The liberal_update and conservative_update functions needed to be modified to handle the cases of empty lists, so that a successfully extracted 'music_list': [{'Author':...},...] will not be overwritten by 'music_list': [] in the calls to liberal_dict_update. Signed-off-by: Jesús <heckyel@hyperbola.info>
* New age restriction bypass method since get_video_info was disabledJames Taylor2021-07-281-7/+2
| | | | | | | From https://github.com/yt-dlp/yt-dlp/issues/574#issuecomment-887171136 Signed-off-by: Jesús <heckyel@hyperbola.info>
* Fix missing likes, dislikes, & music list due to Youtube changesJames Taylor2021-07-281-53/+98
| | | | | | | | | Also moves some microformat extraction from _extract_watch_info_mobile to extract_watch_info where it belongs. _extract_watch_info_mobile is really only for stuff visible on the page, and thus specialized for either mobile or desktop. Signed-off-by: Jesús <heckyel@hyperbola.info>
* Capitalize name appJesús2021-06-101-1/+1
|
* Fix signature decryption due to new base.js minifier rulesJames Taylor2021-02-231-7/+10
| | | | | | | | | | YouTube now includes e.g. {"fe": ...} instead of just {fe: ...} in the javascript object entries in the object holding the operation definitions. Fixes #2 Signed-off-by: Jesús <heckyel@hyperbola.info>
* Improve ytInitialPlayerResponse extractionJames Taylor2020-12-171-2/+10
| | | | | | | Makes it work if there are additional javascripts statements after the playerResponse variable Signed-off-by: Jesús <heckyel@hyperbola.info>
* Always extract from html watch page to get base.js urlJames Taylor2020-12-121-13/+70
| | | | | | Youtube removed the url from the pbj responses. They are now only in the html page. Replaces previous fix for the missing base.js issue.
* Retrieve base.js url from html watch page when it's missingJames Taylor2020-12-091-0/+13
| | | | Fixes failure mode 3 in #22
* yt_data_ext: watch playlist: Fix missing author_url if no author_idJames Taylor2020-11-081-3/+2
| | | | | | | Embedded playlist info was missing author_url key if author_id was None. This caused KeyError in watch.py when it expected that key Closes #37
* Redo fix for failure mode 1 in issue #22James Taylor2020-10-211-4/+4
| | | | | Previous fix didn't work. Should work now. The non-embedded player response can still be present but the urls will be missing.
* remove trailing whitespaceszrose5842020-10-211-1/+1
|
* Use get_video_info to get video urls if player response missingJames Taylor2020-10-191-2/+8
| | | | Fixes failure mode 1 in #22
* Specify video height in html so page doesn't shift down after loadJames Taylor2020-09-241-2/+9
| | | | | Use true video height extracted from youtube to handle videos shorter than their quality size. (e.g. widescreen videos)
* Fix hls_manifest_url not included when there's no other formatsJames Taylor2020-06-281-2/+6
| | | | | | | Since there are no formats, it was retrying with the non-embedded playerResponse, which resulted in the hls_manifest_urls from the embedded player_response being overwritten with None. So use conservative_update instead
* Add dialog for copying urls to external player for livestreamsJames Taylor2020-06-281-10/+52
| | | | | Also for livestreams which are over whose other sources aren't present or aren't ready yet.
* Handle case where embedded player response missingJames Taylor2020-06-281-2/+10
| | | | | | | | Change so it extracts other stuff from regular playerResponse Extract formats from embedded player response, but fallback to regular one if that doesn't work. Sometimes there is no 'player' at top_level and the urls are in the regular playerResponse
* Do not override previous playability error if unknownJames Taylor2020-06-281-1/+1
|
* Fix previously live videos labeled as liveJames Taylor2020-05-291-1/+3
|
* Fix broken signature decryptionJames Taylor2020-05-271-1/+2
| | | | | | | | | The base.js url format changed, so the identifier at the end was no longer unique. So it was using the wrong cached decryption function Changes the identifier to just be the whole url so this won't happen again.
* Fix urls sometimes not extracted due to youtube changesJames Taylor2020-05-271-1/+2
| | | | | The 'cipher' parameter which contains the url is sometimes called 'signatureCipher' instead now.
* Fix error getting exit node ip if format urls are NoneJames Taylor2020-05-271-1/+1
|
* Fix comment count & disabled extraction not working sometimesJames Taylor2020-04-101-3/+14
| | | | because of A/B test.
* Fix exception due to missing 'playlist' key in extracted infoJames Taylor2020-04-051-0/+3
| | | | | | Happens when there's an error on the page and there was no visible stuff on the page. 'playlist' wasn't set to None in that case.
* Fix error when there's a video format with mimetype class of 'text'James Taylor2020-04-041-1/+1
|
* Add playlist sidebar for videos in playlist, including autoplayJames Taylor2020-04-041-2/+32
|
* yt_data_extract: fix missing variables in info for unavailable videosJames Taylor2020-02-171-2/+3
| | | | | 'ip_address' was not set when no formats are available 'allowed_countries' was set to None rather than [] in extract_desktop_info which it turns out is the function that gets used in these cases
* Watch page: add info box with allowed countries and tor exit nodeJames Taylor2020-02-011-0/+8
| | | | Should help with debugging various content blocks
* yt_data_extract: parse mimeType field for codecsJames Taylor2020-02-011-0/+27
| | | | the youtube-dl formats table doesn't have all the necessary information
* Fix signature decryption.James Taylor2020-01-241-1/+1
| | | | | | | | The function body regex was capturing some unrelated new code before the actual function body. Example: `function(a){a=a.split("");var b=[function(c,d){d=(d%c.length+c.length)%c.length;c.splice(-d).reverse().forEach(function(e){return c.unshift(e)}` If you look closely, the closing bracket doesn't match the opening one. I have added `{` to the `[^\}]+` part to make sure it only captures matching brackets. Additionally, I've added `return a\.join\(""\)` to the end for good measure.
* Fix regression: date extraction broken. Move constants to correct file in ↵James Taylor2019-12-201-1/+0
| | | | yt_data_extract
* Extraction: Move non-stateful signature decryption functionality into ↵James Taylor2019-12-191-0/+96
| | | | yt_data_extract
* Extraction: Move stuff around in files and put underscores in front of ↵James Taylor2019-12-191-27/+27
| | | | | | internal helper function names Move get_captions_url in watch_extraction to bottom next to other exported, public functions
* Extraction: Split yt_data_extract.py into multiple filesJames Taylor2019-12-191-0/+449