9 Commits

Author SHA1 Message Date
James Taylor
75e8930958 yt_data_extract: normalize thumbnail and author urls
for instance, urls that start with // become https://

adjustment required in comments.py because the url was left as a
relative url in yt_data_extract by mistake and was using URL_ORIGIN
prefix as fix.

see #31
2020-10-19 12:55:03 -07:00
James Taylor
8e12551471 Switch to mobile api endpoint to fix 'Unknown error' blockage
See https://github.com/iv-org/invidious/issues/1319#issuecomment-671732646
2020-08-11 21:09:59 -07:00
James Taylor
fa61874f97 extract_items: Handle case where continuation has multiple
[something]Continuation renderers, all of which are junk
except one. Check the items in each one until the one which
contains the items being sought is found.
The usage in extract_comments_info needed to be changed to
specify the items being sought. It was unspecified before which
is strictly incorrect since extract_items by default looks for
video/playlist/channel thumbnail items. It was relying on this
special case for continuations. But now that wouldn't work
anymore.
2020-08-11 19:59:25 -07:00
James Taylor
81ff5ab99c extract_channel_info: Improve error extraction
Use extract_str function since it's not always 'simpleText'
Make sure we don't output an empty error message if we don't
know what it is.
channel.py: Don't check if error message is empty, check if it's
None
2020-08-11 19:47:37 -07:00
James Taylor
9737ffcf82 Regression: Fix channel extraction 'items' key not present when there's no items.
Examples: Empty channels, no search results
2019-12-23 15:07:03 -08:00
James Taylor
777ed756dc Channel: Change search results to use next and previous page buttons
Because youtube doesn't give the number of search results, so previous behavior would give an error if a page number out of range was selected.
2019-12-23 14:39:59 -08:00
James Taylor
7a6bcb6128 Rewrite channel extraction with proper error handling and new extraction names. Extract subscriber_count correctly.
Don't just shove english strings into info['stats']. Actually give semantic names for the stats.
2019-12-21 15:45:01 -08:00
James Taylor
4a3529df95 Extraction: Move stuff around in files and put underscores in front of internal helper function names
Move get_captions_url in watch_extraction to bottom next to other exported, public functions
2019-12-19 20:12:37 -08:00
James Taylor
76376b29a0 Extraction: Split yt_data_extract.py into multiple files 2019-12-19 19:29:47 -08:00