61 Commits

Author SHA1 Message Date
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
James Taylor
64434b02ca Convert channel page to flask framework 2019-07-06 19:11:15 -07:00
James Taylor
b32330be4f refactor common.py into 3 files 2019-02-21 21:32:31 -08:00
James Taylor
7f9e91da7a channel: Don't completely fail if can't retrieve # of vids 2019-02-16 14:11:38 -08:00
James Taylor
4d7bba92eb Use pbj format for playlist requests, ajax deprecated 2019-02-07 20:58:17 -08:00
James Taylor
1ba38a5c9c Content-type: text/plain for errors or status messages 2019-01-06 19:31:01 -08:00
James Taylor
36e0409db4 Add newline to end of files 2019-01-06 18:20:29 -08:00
James Taylor
bb2d40ac83 rename env['fields'] to env['parameters'] and rename fields to parameters in general 2019-01-06 01:33:52 -08:00
James Taylor
eea16e5ac3 WSGI for GET and POST requests with path data 2019-01-06 01:19:03 -08:00
James Taylor
6217e6f558 Properly handle case of non-existent channel tab 2018-12-21 02:13:52 -08:00
James Taylor
dca25bd4cc Properly handle terminated channel on channel's playlist and about page 2018-12-21 01:59:33 -08:00
James Taylor
30ed068c33 Fix error when user page has no videos 2018-12-21 01:03:19 -08:00
James Taylor
a8d74ba082 Correctly handle case where channel doesn't exist 2018-12-20 01:11:50 -08:00
James Taylor
9d1c688310 Correctly handle case where channel was terminated 2018-12-20 01:04:43 -08:00
James Taylor
4a8bfac225 Ability to sort playlists on channel 2018-12-19 22:14:11 -08:00
James Taylor
bccc9107b8 Fixed regression: error on channel playlists/search page 2018-12-19 21:23:59 -08:00
James Taylor
75b0c52f57 Ability to sort channel videos by oldest and by views 2018-12-17 02:24:55 -08:00
James Taylor
7c97a17053 Support for custom channel urls 2018-12-16 18:49:09 -08:00
James Taylor
f6778f8c3d channel about page: remove /redirect in links 2018-11-08 22:31:19 -08:00
James Taylor
9d8cbd2b77 Fix channels sometimes giving 500 2018-09-02 15:13:57 -07:00
James Taylor
0f1cc43097 fix shelves breaking channel videos page 2018-08-06 20:28:41 -07:00
James Taylor
09837e9fa6 fix channel title on channel search page 2018-08-06 19:24:36 -07:00
James Taylor
a28b81bfaf fix channel about page error when has no links 2018-07-27 23:58:44 -07:00
James Taylor
b9e4035aa3 channel about page: list links vertically, not inline 2018-07-27 23:52:14 -07:00
James Taylor
2ec95adb5f fix error with certain channels that have tabs hidden 2018-07-27 23:47:56 -07:00
James Taylor
40039ba672 add channel searching 2018-07-19 02:33:48 -07:00