19 Commits

Author SHA1 Message Date
James Taylor
2ab5b96178
Fix videos added to playlist from channel missing author_id
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-31 18:29:37 -05:00
James Taylor
e76257f8b7
Fix comment reply url extraction due to youtube changes
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-23 18:42:16 -05:00
James Taylor
3dee7ea0d1
Switch to new comments api now that old one is being disabled
watch_comment api periodically gives the error "Top level
comments mweb servlet is turned down."

The continuation items for the new api are in a different
arrangement in the json, so changes were necessary to the
extract_items function.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-09 12:10:42 -05:00
James Taylor
a9edc54aac
Use extract_approx_int for comment likes
Full digits no longer available

Closes #64

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-06-10 12:47:09 -05:00
James Taylor
e44647f106
Fix comment like extraction due to Youtube changes
Variable name changed from likeCount to voteCount

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-05-17 22:08:09 -05:00
James Taylor
0ee448c186
Channel about: Add http:// to links without it
So that the link is not interpretted as a relative link

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-05-06 15:21:36 -05:00
James Taylor
e549b5f67c
Channel: Allow going to next pages of playlists page
Uses previous and next buttons. Now can view more than just
first page of playlists page

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-15 22:22:15 -05:00
James Taylor
00ef1c8627
Fix comment replies
Comment reply protobuf now requires the channel id of the uploader
of the video. Otherwise the endpoint returns 500.

Instead of making the protobuf ourselves and passing this data
around through query parameters, just use the ctoken provided to us
but modify the max_replies field from 10 to 250.

Fixes #53

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 11:39:23 -05:00
James Taylor
43679efff5
channel: replace page #s w/ next page button using provided ctoken
Since yt doesn't accept page #'s when sorting by oldest

Signed-off-by: Jesús <heckyel@hyperbola.info>
2020-12-18 23:25:45 -05:00
zrose584
a27b575380 remove trailing whitespaces 2020-10-21 10:35:01 +02:00
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