aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix 403s 1 minute into videosJesus2023-09-111-1/+1
| | | | | https://github.com/iv-org/invidious/issues/4027 https://github.com/TeamNewPipe/NewPipeExtractor/pull/1084/files
* Fix typoJesus E2023-06-181-1/+1
|
* Set related videos thumbnail to HQJesus E2023-06-181-0/+1
|
* Fix music list extractionJesus E2023-05-281-0/+2
| | | | Closes #160
* Revert to android URLs and fix 403s by including paramsJesus E2023-05-281-12/+15
| | | | | | | | | Including 'params': '8AEB' fixes the issue with the URLs returning 403 after a couple minutes into the video. Credit to @ImportTaste for pointing this out Closes #168
* Only use android URLs if encrypted; they randomly go 403Jesus E2023-05-281-1/+6
| | | | Android URLs now begin returning 403s mid playback at random.
* Partially fix age restricted videosJesus E2023-05-281-67/+117
| | | | | | | | | | Does not work for videos that require decryption because decryption is not working (giving 403) for some reason. Related invidious issue for decryption not working: https://github.com/iv-org/invidious/issues/3245 Partial fix for #146
* Fix "This video is unavailable" due to outdated androidJesus E2023-05-281-1/+2
| | | | | | | | | | | client Send the latest android client version as well as a new key with the sdk version. See https://github.com/iv-org/invidious/pull/3255 for more details Fixes #165
* Fix preview_thumbnailsJesús2022-05-301-7/+7
| | | | use 'deep_get' for storyboard
* Fix exception when _captions_base_url is not presentJames Taylor2022-03-301-1/+3
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* handle missing storyboardzrose5842022-01-171-1/+2
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* add preview thumbnailszrose5842022-01-091-0/+64
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Disable dislikesJesús2021-12-261-1/+0
| | | | Ref: https://blog.youtube/news-and-events/update-to-youtube/
* Work around video throttling using android user-agentJames Taylor2021-10-181-34/+35
| | | | | | Temporary fix for #95 Signed-off-by: Jesús <heckyel@hyperbola.info>
* watch.py: Support /shorts urlsJames Taylor2021-09-061-0/+2
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Redo av codec settings & selections to accomodate webmJames Taylor2021-09-061-57/+73
| | | | | | | | | | | | | | Allows for ranked preferences for h264, av1, and vp9 codecs in settings, along with equal preferences which are tiebroken using smaller file size. For each quality, gives av-merge a list of video sources and audio sources sorted based on preference & file size. It will pick the first one that the browser supports. Closes #84 Signed-off-by: Jesús <heckyel@hyperbola.info>
* Support more audio and video qualitiesJames Taylor2021-08-311-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | Adds support for AV1-encoded videos, which includes any videos above 1080p. These weren't getting included because they did not have a quality entry in the format table at the top of watch_extraction.py. So get the quality from the quality labels of the format if it's not there. Because YouTube often includes BOTH AV1 and H.264 (AVC) for each quality, after these are included, there will be way too many quality options and the code needs to choose which one to use. The choice is somewhat hard: AV1 is encoded in fewer bytes than H.264 and is patent-free, however, it has less hardware support, so might be more difficult to play. For instance, on my system, AV1 does not work on 1080p, but H.264 does. Adds a setting about which to prefer, set to H.264 as the default. Also adds support for the lower quality mp4 audio quality, which now gets used at 144p to save network bandwidth. For similar reasons, this was not getting included because it did not have an audio_bitrate entry in the table. Prefer bitrate instead for the quality. Signed-off-by: Jesús <heckyel@hyperbola.info>
* Add setting to prefer uni or pair sources and fix selection b/w themJames Taylor2021-08-291-4/+13
| | | | | | | | | pair_quality != uni_quality was the wrong condition to check, since there are cases where the target_resolution is 360, and there are no pair sources at 360, but there are some at other resolutions, which would falsely select the pair sources. Signed-off-by: Jesús <heckyel@hyperbola.info>
* watch: Fix using_pair_sources being a list due to short-circuitingJames Taylor2021-08-291-1/+1
| | | | | | | | In the case where pair_sources is empty due to a playability error, using_pair_sources will be assigned to pair_sources (empty list) because of short circuiting. Make it a bool Signed-off-by: Jesús <heckyel@hyperbola.info>
* watch.html: Move loose inline javascript into watch.jsJesús2021-08-291-1/+4
| | | | | | | | The number of inline code blocks and the dependencies between them became unmanageable. From 9d96c07a3c2e68f1893634574c3be64e41a2c041 Mon Sep 17 00:00:00 2001 From: James Taylor <user234683@users.noreply.github.com>
* Integrate quality selection into PlyrJames Taylor2021-08-291-0/+2
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Add video quality selectorJames Taylor2021-08-291-8/+31
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Add support for more qualities, merging video+audio using MSEJames Taylor2021-08-291-24/+103
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Revert "Add support for more qualities, merging video+audio using MSE"Jesús2021-08-291-103/+24
| | | | This reverts commit d56df02e7b1eba86baf511289208295b1f6c5a50.
* Add support for more qualities, merging video+audio using MSEJames Taylor2021-08-291-24/+103
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* watch: determine video source based on quality, not actual heightJames Taylor2021-08-041-1/+2
| | | | | | | | | | For some phone videos, the dimensions of the video might be e.g. 360x640 instead of 640x360, which would be compared as though it was "640p", and thus no source would be chosen if default quality is 360p. Use the 'quality' entry which will always be 360 for that quality. Signed-off-by: Jesús <heckyel@hyperbola.info>
* pep 8Jesús2021-08-031-3/+1
|
* Remove static check resolution in TOR modeJesús2021-08-031-8/+3
|
* Fix max_resolution in TOR modeJesús2021-08-021-1/+1
| | | | some videos have 480p resolution, and if setting only 360p the player would have no video to play
* Revert "fix check max_resolution in TOR mode"Jesús2021-08-021-1/+1
| | | | This reverts commit cb9b6dadbd1c3e268e87cd8eac9097760b3526ab.
* fix check max_resolution in TOR modeJesús2021-08-021-1/+1
|
* New age restriction bypass method since get_video_info was disabledJames Taylor2021-07-281-24/+32
| | | | | | | From https://github.com/yt-dlp/yt-dlp/issues/574#issuecomment-887171136 Signed-off-by: Jesús <heckyel@hyperbola.info>
* Improved plyr configurationJesús2021-07-031-0/+2
|
* get_video_info: Specify language so error messages are in englishJames Taylor2021-07-011-0/+1
| | | | | | Otherwise error message language will be region of Tor exit node Signed-off-by: Jesús <heckyel@hyperbola.info>
* Workaround for age restriction bypassJames Taylor2021-06-231-2/+6
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* feat: add direct linkUmimaso2021-06-231-0/+1
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Capitalize name appJesús2021-06-101-1/+1
|
* Fix 404 errors on scheduled live events and age-gate bypassJames Taylor2021-06-011-5/+22
| | | | | | | | | | get_video_info now returns 404 error. Adding html5=1 fixes it (for now). See https://github.com/ytdl-org/youtube-dl/issues/29086#issuecomment-844892791 Also handles 404 error if it arises so it will be non-fatal Signed-off-by: Jesús <heckyel@hyperbola.info>
* Fix vids added to playlist from watch page not having author urlJames Taylor2021-05-171-4/+5
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* Fix regression: playlists not showing up besides videosJames Taylor2021-03-151-1/+1
| | | | | | Forgot to change & to ? in previous commit changing to embed page Signed-off-by: Jesús <heckyel@hyperbola.info>
* Use mobile embed page to bypass captcha blockageJames Taylor2021-02-261-1/+1
| | | | | | | | The aggressive IP-blocking doesn't apply to embed pages Fixes #47 Signed-off-by: Jesús <heckyel@hyperbola.info>
* General theme: fix syntax W3C markup and add improve 'Published' dateJesús2020-12-301-0/+2
| | | | Signed-off-by: Jesús <heckyel@hyperbola.info>
* pep8Jesús2020-12-211-1/+1
|
* Include watch_headers in get_video_info so error lang is englishJames Taylor2020-12-211-1/+3
| | | | | | | | | | | e.g. if the error in get_video_info is "Video unavailable" must include the Accept-Language header (which we have in watch_headers) in order to get an English error message. Otherwise we get the language of the Tor exit node region Example: https://youtu.be/aaaaaaaaaaa Signed-off-by: Jesús <heckyel@hyperbola.info>
* Fix exception when video comments disabled and blank comments infoJames Taylor2020-12-211-1/+1
| | | | | | | e.g. happens on vid where comments are disabled if comments disabled in settings since the comments info object is just {} Signed-off-by: Jesús <heckyel@hyperbola.info>
* Patch-import-migrate: Add embed page for embeds on the webJesús2020-12-191-7/+23
| | | | | | | Issue #36 From e51f0a78c778a2283887db7ffc22421a7c849296 Mon Sep 17 00:00:00 2001 From: James Taylor <user234683@users.noreply.github.com>
* pep8Jesús2020-12-151-15/+27
|
* Always extract from html watch page to get base.js urlJames Taylor2020-12-121-25/+6
| | | | | | 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-13/+25
| | | | Fixes failure mode 3 in #22
* watch: Fix exception in to_valid_filename when video title is NoneJames Taylor2020-10-281-1/+1
|