86 Commits

Author SHA1 Message Date
80b7f3cd00
Update user-agents and update android client parameters to fix blockage 2024-03-30 10:10:35 +08:00
d2c883c211
fix thumbnail into channel 2024-01-28 13:21:54 +08:00
5f3b90ad45
Fix channel about tab 2024-01-22 06:29:42 +08:00
ca4a735692
Add settings for filtering out shorts in subscriptions and channels 2024-01-22 05:55:59 +08:00
4be01d3964
Put back sort by oldest logic since YouTube added it back
Previous commit replaced it with shorts-filtering, use sort code
number 4 for that instead. Sort by oldest is still broken
pending reverse engineering of new ctoken format, however.
2024-01-22 05:47:09 +08:00
b45e3476c8
channels: Use the UU playlist to get videos by default
This will be much less likely to break moving forward since
YouTube rarely changes the playlist api

Videos page now includes shorts and streams in the video lsit

Also include an option to filter out shorts on the videos page
2024-01-22 05:39:11 +08:00
Jesus E
5d53225874
Fix pagination 2023-06-18 13:55:07 -04:00
Jesus E
93b58efa0e
Fix offset format 2023-06-17 16:17:18 -04:00
Jesus E
db08283368
Update token offset field
Change offset field to a uint with field number 1
2023-06-17 16:16:40 -04:00
Jesus E
f322035d4a
Add functional but preliminary channel tab support
Add channel tabs to the channel template and script
Update continuation token to request different tabs

Add support for 'reelItemRenderer' format required to extract shorts
2023-06-17 16:05:40 -04:00
Jesus E
43e7f7ce93
Cache channel metadata for pages that don't provide it
Ensures channel profile picture & description are displayed

Also ensures that videos added to a local playlist from such pages
will have the channel name included

Fixes #151
2023-05-28 21:19:55 -04:00
Jesus E
97032b31ee
Update channel ctoken format due to youtube changes
Hopefully they don't immediately revert it.

Related to #151
2023-05-28 21:17:03 -04:00
Jesus E
14c8cf3f5b
Fix error with non-channel-id urls
Only update channel id based on the url if we have it
2023-05-28 21:10:39 -04:00
Jesus E
3025158d14
Use ctoken_v3 format for channel playlist & search pages
For #151
2023-05-28 21:08:05 -04:00
Jesus E
fb13fd21ef
channels: Fix sorting & page prefixing not working
Further completes #151
2023-05-28 21:06:53 -04:00
Jesus E
68752000f0
Update channel to new ctoken format
Huge thanks to @michaelweiser

Different sortings still don't work for videos and playlists
2023-05-28 21:04:36 -04:00
James Taylor
6c6c469fbd
Prefix youtube URLs in video descriptions and channel about page
Closes #75

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-09 12:27:49 -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
1170403953
Fix channel search
Update the search from the browse_ajax api to the new one
Fixes #57

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-15 22:04:09 -05:00
James Taylor
1532a48ef4
Fix regression: Channels not sorting by oldest/popular
get_channel_first_page was mistakenly used when the sorting
or view is different. Must use channel_tab which generates
the necessary ctokens.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:40:55 -05:00
James Taylor
2df4238924
Use new channel api endpoint now that browse_ajax is disabled
Fixes channel pages > 1

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:40:02 -05:00
James Taylor
f7ed8159cd
Channel: use general pbj=1 endpoint to get first page of videos
YouTube disabled the browse_ajax endpoint. Quick fix for first
channel page. In general, this will be more robust against api
endpoint changes. As YouTube continues to change api endpoints,
at least the subscriptions and first page will no longer break.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:33:45 -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
James Taylor
3fa5a55f57
Fix channel search by using new protobuf format
Fixes 'Unknown Error'

Closes #42

Signed-off-by: Jesús <heckyel@hyperbola.info>
2020-12-16 20:46:53 -05:00
b9a3082e7c
pep8 2020-12-15 21:52:04 -05:00
zrose584
a0c33c621e fix get_number_of_videos_channel 2020-10-09 19:43:22 +02:00
James Taylor
1ff97bfde1 New ctoken format. Fix channel pages > 1.
page > 1 still broken when sorting by oldest
2020-09-17 20:56:41 -07:00
James Taylor
27300d0e7d channel: Rename headers_1&headers_pbj & include user agents in them
headers_1 -> headers_desktop
headers_pbj -> headers_mobile
2020-08-12 15:05:31 -07:00
James Taylor
5637d4f430 channel_ctoken_desktop: fix parenthesis formatting 2020-08-12 14:55:51 -07:00
James Taylor
ac9b7f0162 Switch to desktop endpnt w/ new ctoken format except sort by old>1
Sorting by old for pages > 1 currently broken on some channels;
it's still using the mobile endpoint.
2020-08-12 14:46:29 -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
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
b5d42e2f3c Fix regression: local playlist form not shown on channel videos page 2020-03-29 15:00:53 -07: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
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
222117143f Finally fix video count on channels accessed through general urls, rather than just channel id.
It was set to a fake value of 1000 previously in order to ensure there would be enough page buttons.
This was because two sequential requests are necessary (one to get the channel id corresponding to the custom url, another to get the number of videos from the "all uploaded videos" playlist, the url for which can be generated from the channel id).

Since Tor has a high latency, I thought at the time that this would be too slow, but in practice it's not too big of a deal.

Introduces cachetools dependency in order to cache the function which gets the number of videos.

The get_channel_id function has also been fixed since the ajax api seems to have been removed.
2019-12-22 18:29:31 -08:00
James Taylor
bafae2837e channel.py: Refactor channel_id route logic into general channel url logic.
Deduplicates the code. channel_id logic was previously separate because of the need to get the number of videos and different page numbers
Also makes search work for general urls, not just channel_id urls
2019-12-22 18:26:00 -08:00
James Taylor
d1d908d5b1 Extraction: Move html post processing stuff from yt_data_extract to util 2019-12-19 19:48:53 -08:00
James Taylor
dc6c370152 Extraction: refactor response extraction to work with both mobile & desktop respones, also improve errors 2019-09-19 11:06:34 -07:00
James Taylor
216231f9a6 Extraction: Proper error handling for terminated or non-existant channels 2019-09-08 17:48:02 -07:00
James Taylor
bd343ed71f Extraction: Move channel extraction to yt_data_extract 2019-09-08 17:28:11 -07:00
James Taylor
fb1a3531c5 Extraction: Fix url prefixing 2019-09-08 17:20:02 -07:00
James Taylor
046d7226ea Subscriptions: improve checking messages, say how many new vids from channel 2019-08-14 18:39:39 -07:00
James Taylor
2617f87e17 Add subscribe button on channels 2019-08-10 18:12:02 -07:00
James Taylor
10f1d7945e channel bugfix: supply playlist names in playlist adding form for tabs with vids 2019-07-24 00:43:01 -07:00
James Taylor
e00c3cf99f Remove ad-hoc response saving from code, create a debug setting for fetch_url 2019-07-23 23:57:45 -07:00
James Taylor
cb1c899a45 channel: Add short description under channel name 2019-07-23 22:55:15 -07:00
James Taylor
fe38aa214b Fix error when channel has empty description 2019-07-23 22:36:43 -07:00
James Taylor
2034b6bd25 Fix unrouted channel avatar image on empty channels 2019-07-23 22:34:13 -07:00
James Taylor
8eff0bb9e2 Delete obsolete files 2019-07-21 21:59:52 -07:00