Commit Graph

74 Commits

Author SHA1 Message Date
syeopite
e91421253e Fix Style/VerboseBlock issues 2021-10-25 01:12:26 -07:00
syeopite
35d15c7c2b Fix Style/VariableNames issues 2021-10-25 01:12:26 -07:00
syeopite
20cb751ff6 Fix Lint/UnusedArgument issues 2021-10-25 01:12:26 -07:00
syeopite
be1a43a337 Manually extract category refactor from 1b569bbc99207cae7c20aa285f42477ae361dd30
Also fixes some errors caused by cherry-picking
2021-09-24 21:07:07 -07:00
syeopite
57c63f3598 Rename "items_without_cate_items" to reflect usage 2021-09-24 21:07:06 -07:00
syeopite
ae30f32c36 Unpack search items that are embedded in categories
This is a squash of a bunch of commits
cherry-picked commits

Fix category parse error on search

(cherry picked from commit cc02fed4e69f0eb5f19e017173632b3a3f20519f)

Fix category items not being extracted in search

(cherry picked from commit 2605b9c609ff217b5a6ae09d22450596dcad90fc)

Make search not include category items for now

(cherry picked from commit ca4afd59f46b595e3c339f31432cad98a5771ee1)

Change behavior of categories in search results

(cherry picked from commit cc1067561051b1c113b490e79c4a71cd346f7b3f)

Fix missing search results in extraction

(cherry picked from commit abda6840d5bfe58f845128bdd1a3f4916dd3bb84)

Fix miscount of search results

(cherry picked from commit 491e33450eb1300d0234bb33df0d0e78a027114f)
2021-09-24 21:07:06 -07:00
syeopite
a50f64f6e9 Add parser for categories (shelfRenderer)
This commit adds a new parser for YT's shelfRenderers which are
typically used to denote different categories.The code for featured
channels parsing has also been moved to use the new parser but some
additional refactoring are needed there.

The ContinuationExtractor has also been improved and is now capable of
extraction continuation data that is packaged under
"appendContinuationItemsAction"

In additional this commit adds some useful helper functions to extract
the current selected tab the continuation token. This is to mainly
reduce code size and repetition.
--
This cherry-picked commit also removes the code for parsing featured
channels present on the original.

(cherry picked from commit 8000d538dbbf1eb9c78e000b1449926ba3b24da9)
2021-09-24 21:07:06 -07:00
Émilien Devos
12b46bbd41 switch to innertube API for about channels (#2255) 2021-08-12 16:00:26 -07:00
Samantaz Fox
5b020e81ca Youtube api improvements (#2277)
* Put youtube API functions under the YoutubeAPI namespace

* Implement the following endpoints:
  - `next`
  - `player`
  - `resolve_url`

* Allow a ClientConfig to be passed to YoutubeAPI endpoint handlers.

* Add constants for many new clients

* Fix documentation of YoutubeAPI.browse(): Comments and search
  result aren't returned by the browse() endpoint but by the next()
  and search() endpoints, respectively.

* Accept gzip compressed data, to help save on bandwidth

* Add debug/trace logging

* Other minor fixes
2021-08-03 02:58:27 +02:00
Samantaz Fox
26a7e1b049 Use '/youtubei/v1/search' endpoint for search queries 2021-05-24 13:19:28 +02:00
Samantaz Fox
43bd331e48 Multiple youtube_api.cr helper fixes
Add documentation
Bump web client version string
Add charset=UTF-8 to the 'content-type' header
Parse JSON and return it as a Hash
Handle API error messages
2021-05-24 13:19:28 +02:00
Svallinn
acfa9e8a55 Parse responses to JSON instead of using regex 2021-03-26 04:17:46 +00:00
Svallinn
e49aaa0216 Fix channel search API 2021-03-24 05:15:06 +00:00
Andrew Zhao
2600695927 fix search
Put search page in the super secret proto field
2021-02-25 22:19:22 -05:00
Andrew Zhao
15ba3325d9 add ui for searching 2021-01-17 14:33:49 -05:00
Omar Roth
452d1e8307 Fix warnings with latest version of Crystal 2020-07-26 10:59:31 -04:00
Omar Roth
056e7432bd Update channel playlists to use polymer 2020-06-16 17:51:35 -05:00
Omar Roth
1eca969cf6 Add support for polymer redesign 2020-06-15 18:18:04 -05:00
Omar Roth
c1cbdae5ee Make HOST_URL constant 2020-06-15 18:13:14 -05:00
Omar Roth
ca1185d0be Fix warnings in latest version of Crystal 2020-04-09 12:18:09 -05:00
Omar Roth
e3b2bcfd06 Fix ID for search duration 2019-11-08 09:29:33 -05:00
Omar Roth
f6ef0b684a Fix word-break for links in channel RSS 2019-11-03 08:53:16 -05:00
Omar Roth
25c8cd9246 Fix escaping for search params 2019-10-28 06:17:39 -04:00
Omar Roth
2ebfaf76f2 Refactor continuation token handling 2019-10-27 13:50:42 -04:00
Omar Roth
6930570fa2 Add HTTPClient pool 2019-10-25 12:58:16 -04:00
Omar Roth
be055d9dcb Add support for custom playlists 2019-10-15 21:17:14 -04:00
Omar Roth
1e34a61911 Fix white-space for RSS feeds 2019-10-14 21:07:07 -04:00
Omar Roth
c0796ac3d6 Add description to RSS body 2019-10-04 12:50:22 -04:00
Omar Roth
eef66de68c Merge pull request #743 from girst/rssparams
Forward query string parameters from Atom feeds
2019-09-30 15:36:35 -04:00
girst
4aa1180fce Forward parameters given in &params= from Atom feeds
Any parameters given in &params=... are appended to /watch URLs.  This
allows e.g. passing &raw=1&listen=1 to a playlist of music and use an
rss reader like newsboat as a media player, like so:

    https://invidio.us/feed/playlist/XXX?params=%26raw%3D1%listen%3D1

All three feeds--channels, playlists, subscriptions--are supported.
2019-09-30 17:48:13 +02:00
leonklingele
1aefc5b540 Update to Crystal 0.31.0, resolve compiler deprecation warnings, update dependencies (#764)
* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See https://github.com/crystal-lang/crystal/pull/8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
2019-09-24 13:31:33 -04:00
Omar Roth
50d793e49b Hide video count for auto-generated channels 2019-09-12 13:11:21 -04:00
Omar Roth
0f49d424d3 Refactor search params 2019-08-27 09:35:15 -05:00
Omar Roth
059f50dad4 Add 'playlistThumbnail' to playlist objects 2019-08-21 19:08:11 -05:00
Omar Roth
a19cdb5e72 Fix season playlists 2019-08-16 15:46:59 -05:00
Omar Roth
dce5816b18 Fix image url extractor 2019-07-31 19:16:09 -05:00
Omar Roth
f18d8229c0 Refactor continuation protocol buffers 2019-07-20 20:18:08 -05:00
Omar Roth
e30d70b6d4 Refactor proxy_list into global 2019-06-28 21:17:56 -05:00
Omar Roth
b43e9ed7e7 Refactor 'description_html' 2019-06-08 15:08:27 -05:00
Omar Roth
12b2ab5da8 Add 'to_json' into respective structs 2019-06-08 13:31:41 -05:00
Omar Roth
27e032d10d Add '/api/v1/auth/feeds' 2019-06-07 21:13:50 -05:00
Omar Roth
19ed5bf993 Add support for 'user' URLs in NewPipe import 2019-04-22 15:39:57 -05:00
Omar Roth
aa8ff7ace3 Always use ucid for channel search 2019-04-11 13:52:09 -05:00
Omar Roth
bd4f5ebcdf Add option to configure default user preferences 2019-04-03 11:38:41 -05:00
Omar Roth
1b78001201 Use struct for allocations 2019-03-29 16:30:02 -05:00
Omar Roth
fd26f9f34e Add support for premieres to search and feed 2019-03-22 14:54:35 -05:00
Omar Roth
99aa214859 Add 'thumbnail_id' to playlists 2019-03-17 12:21:47 -05:00
Omar Roth
17b84f32df Fix duration in /api/v1/search 2019-02-26 14:31:37 -06:00
Omar Roth
a7b79824de Add support for 'region' in search 2019-02-06 18:21:40 -06:00
Omar Roth
276662a147 Use IO::Memory for creating continuation tokens 2019-02-04 15:17:10 -06:00