invidious-mod-JP/src/invidious
syeopite 1323b94b7a
Rewrite extract_item and extract_items functions
This commit completely rewrites the extract_item and extract_items
function. Before this commit these two function were an unreadable
mess. The extract_item function was a lengthy if-elsif chain
while the extract_items function contained an incomprehensible
mess of .try, else and ||.

With this commit both of these functions have been pulled into a
separate file with the internal logic being moved to a few classes.

This significantly reduces the size of these two methods, enhances
readability and makes adding new extraction/parse rules much simpler.

See diff for details.

--
This cherry-picked commit also removes the code for parsing featured
channels present on the original.

(cherry picked from commit a027fbf7af1f96dc26fe5a610525ae52bcc40c28)
2021-09-24 21:06:46 -07:00
..
channels Extract API routes from invidious.cr (2/?) 2021-08-14 00:18:24 -07:00
helpers Rewrite extract_item and extract_items functions 2021-09-24 21:06:46 -07:00
jobs Pick a random video for bypass captcha 2021-06-25 15:37:37 +00:00
routes Fix livestream regex regression caused by #2271 2021-09-25 02:47:52 +00:00
views Remove login type button from frontend (#2423) 2021-09-23 08:44:26 +02:00
comments.cr Merge pull request #2380 from syeopite/fix-invidious-showing-yt-redirect-links 2021-09-06 11:15:08 +02:00
jobs.cr Provide rough draft of better project organization 2020-10-05 23:57:19 -05:00
mixes.cr Add backtraces to errors (#1498) 2020-11-30 10:59:21 +01:00
playlists.cr Youtube api improvements (#2277) 2021-08-03 02:58:27 +02:00
routing.cr Fix mixes route (#2421) 2021-09-20 22:39:32 -07:00
search.cr switch to innertube API for about channels (#2255) 2021-08-12 16:00:26 -07:00
trending.cr Youtube api improvements (#2277) 2021-08-03 02:58:27 +02:00
users.cr Display username in header 2021-06-19 04:58:42 -07:00
videos.cr Handle equirectangular projections for VR (#2379) 2021-09-10 07:42:39 +00:00