830 Commits

Author SHA1 Message Date
James Taylor
b3b48967c5 Bugfix: Support integer-only ?t param
When there's only an integer, and no unit, it's all in seconds
2020-07-30 13:07:16 -07:00
James Taylor
e78d239323 Add support for &t parameter 2020-07-25 21:25:23 -07:00
James Taylor
a7ff3a5217 Playlist page: Fix error on failure to extract playlist title
Such as when the playlist was deleted or doesn't exist
2020-07-25 21:03:42 -07:00
James Taylor
9fc347e093 Add video transcript to downloads
Generated from the video captions
2020-07-25 19:40:37 -07:00
James Taylor
44d7f9da99 Include livestream fmt urls for former livestream w/o static urls
If none of the format urls for the former livestream are static,
meaning they use a non-livestream format playable by the browser,
then include the dialog for copying hte livestream format urls
into external video player
2020-06-28 18:20:47 -07:00
James Taylor
803c901445 Fix hls_manifest_url not included when there's no other formats
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
2020-06-28 18:18:04 -07:00
James Taylor
aa3e5aa441 Add dialog for copying urls to external player for livestreams
Also for livestreams which are over whose other sources
aren't present or aren't ready yet.
2020-06-28 17:52:24 -07:00
James Taylor
6e14a8547d Handle case where embedded player response missing
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
2020-06-28 13:18:54 -07:00
James Taylor
0b5d6fe1ed Do not override previous playability error if unknown 2020-06-28 12:46:04 -07:00
James Taylor
b4450ec4bb Fix previously live videos labeled as live 2020-05-29 15:34:33 -07:00
James Taylor
bdac6a2302 Fix broken signature decryption
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.
2020-05-27 12:15:41 -07:00
James Taylor
85db7e46ed Fix urls sometimes not extracted due to youtube changes
The 'cipher' parameter which contains the url is sometimes called
'signatureCipher' instead now.
2020-05-27 11:56:30 -07:00
James Taylor
d7a4b03fdf Add option for reloading video without invidious
For faster usage of new identity button as an alternative
2020-05-27 11:55:47 -07:00
James Taylor
3d5293ba4a Fix error when invidious fails to return URLS 2020-05-27 11:19:39 -07:00
James Taylor
f1f77c4d77 Fix error getting exit node ip if format urls are None 2020-05-27 11:14:52 -07:00
James Taylor
d5e661dfd3 Indicate that video is live 2020-05-27 11:14:19 -07:00
James Taylor
b2f482f1fb Fix comment count & disabled extraction not working sometimes
because of A/B test.
2020-04-10 13:57:11 -07:00
James Taylor
481b4ecf58 Do not hide comments if false determination of disabled comments
If the extraction from watch page determines that they are
disabled, but the separate request for the comments found comments,
then change that determination, with a warning (since that would
be a bug). And set the comment count to None as a dirty way to
make such a bug noticeable.
2020-04-10 13:25:40 -07:00
James Taylor
1224dd88a3 Fix related video extraction sometimes failing
Youtube added some pointless variation in variable names
2020-04-10 13:09:38 -07:00
James Taylor
3e09193eaf Fix exception due to missing 'playlist' key in extracted info
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.
2020-04-05 17:27:43 -07:00
James Taylor
dd5c9a5d41 Fix parameters being ignored in youtu.be links
The parameters weren't passed to the underlying function
2020-04-05 17:26:48 -07:00
James Taylor
4d9d8cec6f Fix error when there's a video format with mimetype class of 'text' 2020-04-04 22:53:49 -07:00
James Taylor
5554d5afff Add playlist sidebar for videos in playlist, including autoplay 2020-04-04 22:52:09 -07:00
James Taylor
b5d42e2f3c Fix regression: local playlist form not shown on channel videos page 2020-03-29 15:00:53 -07:00
James Taylor
d1bdbf4269 Prevent long titles with no spaces overflowing item containers 2020-03-20 22:08:42 -07:00
James Taylor
408a9c79ae Correctly start and stop subscriptions autochecker when it is
disabled/enabled in settings.
2020-03-08 21:01:15 -07:00
James Taylor
56e7751da7 Fix failure to parse comments when there's one from deleted channel
Specifically, fix failures when any of the fields from the parsed
comment are None, such as author, author_url, etc.
(failure due to string concatenation when building urls).
2020-03-08 16:17:04 -07:00
James Taylor
fa112592fa Correct malformed query strings: change ? to & so flask
parses it correctly.

Otherwise, parameters starting with ? will be included in the video
id, which messes up the comments since the extraneous data is
passed into the the ctoken.
2020-03-08 13:40:32 -07:00
James Taylor
af334a8ac7 Fix subscriptions new video count when there are deleted videos
It would be 30 since the old method looked to see where the latest
video in the database is in the new batch of videos. New method
finds the first video in the new batch which is in the database.
2020-02-27 11:21:42 -08:00
James Taylor
c6fe9b8fc7 Fix subscription checking breaking due to workers crashing
The try statement was missing an except clause. So if there
was an exception such as the tor browser being closed or
getting a 429 error during the request, the workers would
crash until there were none left to handle checking.
2020-02-23 10:42:13 -08:00
James Taylor
77c4d913ca Specify default font for consistency between operating systems
On debian for instance, the default font DejaVu Sans is bigger
than the default calibri/times on Windows, messing up the layout
in some places. The font size in video items was adjusted
slightly to accomodate the change to liberation sans for the
default.
2020-02-22 22:53:24 -08:00
James Taylor
00cf61d625 Change px values to rem values in font-size declarations 2020-02-22 22:14:11 -08:00
James Taylor
0989d55db1 Ensure urllib3 and python version not leaked during video file check
This is likely not a big deal since it is already assumed that video file server logs are not plugged into
Google's tracking infrastructure, but it doesn't hurt to give less info.
2020-02-18 22:17:50 -08:00
James Taylor
3beb2809ae Subscriptions auto-checking: Better console error message for 429 errors
Display a descriptive error message instead of a traceback
2020-02-18 22:14:39 -08:00
James Taylor
f253247949 Fix MaxRetryError when checking for video URL access
The default urllib3 max redirect amount was set to 3. Change it to 10 and
do not fail if there is a problem with checking for URL access. Just print
the error to the console and proceed.

Also add an unrelated remark about the bcptr=9999999999 parameter in watch.py
2020-02-18 11:47:23 -08:00
James Taylor
8c2b81094e yt_data_extract: fix missing variables in info for unavailable videos
'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
2020-02-17 20:15:59 -08:00
James Taylor
6f28d959f0 Fix FileNotFound error when trying to download search plugin when the working directory is not the directory of the program 2020-02-06 22:17:58 -08:00
James Taylor
d86384c4ec Readme: clarify redirector usage 2020-02-04 20:31:59 -08:00
James Taylor
fffbe5c318 Update readme 2020-02-04 20:02:19 -08:00
James Taylor
14b9c30daf Invidious fallback: Use original format info and just substitute invidious urls
Because the invidious formats don't have all the information
2020-02-04 19:08:56 -08:00
James Taylor
9f090dbbf8 Watch page: add info box with allowed countries and tor exit node
Should help with debugging various content blocks
2020-02-01 16:16:49 -08:00
James Taylor
3f310bfc33 Adjust 429 error message. A Tor Browser restart is not required.
The New Identity button suffices to get the socks proxy to use a new exit node.
2020-02-01 15:14:26 -08:00
James Taylor
7c2736aa26 Check for 403 errors and fallback on Invidious
403 errors on the video urls happen typically when a video has copyrighted content or was livestreamed originally. They appear to not happen (or at least happen less frequently) if the Tor exit node used ipv6, however.
2020-02-01 15:09:37 -08:00
James Taylor
e364927f83 yt_data_extract: parse mimeType field for codecs
the youtube-dl formats table doesn't have all the necessary information
2020-02-01 14:23:50 -08:00
James Taylor
f787e4e202 Give a proper error message for 429 errors
These occur when too many requests are coming from a Tor exit node.
Before, there would be an error page with an exception instructing users to report the issue.
But this is an expected and persistent issue.
2020-01-31 20:06:15 -08:00
James Taylor
cd4a2fb0eb run.bat: Allow command line usage from any directory
Set the youtube-local directory as the working directory, and use setlocal
so it doesn't affect the shell the command is being run from.
2020-01-30 18:24:23 -08:00
James Taylor
cf507e2cd1 Add full visual c runtime to fix missing dll errors on fresh windows installs
On fresh installs, when no programs have been installed which install
visual c runtime as a dependency, the dlls are not present and brotli fails
to load. Bundle them in releases and make sure brotli sees them by
adding their location to the path (in run.bat)
2020-01-30 18:17:09 -08:00
James Taylor
b2a1f4ecfb Fix signature decryption.
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.
2020-01-24 14:11:59 -08:00
James Taylor
c13a8f677d local playlists: Display error message if no videos are selected or no playlist is chosen when using "add to playlist"
See #4
2020-01-19 14:29:50 -08:00
James Taylor
a677b47c4a Fix display of movie thumbnails in related videos 2020-01-10 09:34:14 -08:00