Commit Graph
28 Commits
Author SHA1 Message Date
xarantolus 955c4cb6ac [youtube/search_url]: improve title extraction 2020-09-30 15:49:51 +02:00
xarantolus c0a1a8926d Use better regex for all fixed extraction types 2020-09-22 20:52:52 +02:00
xarantolus c4a1d0eef8 Merge branch 'fixYTSearch' of https://github.com/xarantolus/youtube-dl into fixYTSearch 2020-09-06 09:25:02 +02:00
xarantolus bea9b00588 Fix regex for other variable declaration type
This now supports declarations like `window["ytInitialData"] = ...` and `var ytInitialData = ...`
2020-09-06 09:22:49 +02:00
xarantolus f442082a50 [youtube] More general title extraction
Seems like this attribute is moved every few weeks, so we just extract both and use the one that is present.
2020-09-06 09:22:48 +02:00
xarantolus 1f93faf60b [youtube] Make ytcfg.set config extraction non-fatal
If the markup of the page changes in the future, it might be possible that _FEED_DATA still works, but the other regex does not. SInce it is not necessary for the first page of videos, we make sure the program doesn't exit before extracting them.

TL;DR: Extract the first video page even if there are problems
2020-09-06 09:22:47 +02:00
xarantolus 299056ad52 Fix python2 compatibility and title extraction 2020-09-06 09:22:47 +02:00
xarantolus f536080701 Run formatter 2020-09-06 09:22:46 +02:00
xarantolus 5c430b67bd [youtube] Fix feed extraction
In order to extract videos from further pages, we need to get various variables that are in an argument to the `ytcfg.set` call in a script on the feed page.
2020-09-06 09:22:46 +02:00
xarantolus e03b4f3e05 [youtube] Make search extraction less dependent on json schema.
If an object looks like a video (it has a `videoId` key), assume that it is.
2020-09-06 09:22:30 +02:00
xarantolus 19f671f88b [youtube] Move search URL extraction to appropriate extractor 2020-09-06 09:21:26 +02:00
xarantolus b948643f9c [youtube] Fix extraction of search urls (closes ytdl-org/youtube-dl#25696) 2020-09-06 09:21:25 +02:00
xarantolus 4c47858c05 Fix regex for other variable declaration type
This now supports declarations like `window["ytInitialData"] = ...` and `var ytInitialData = ...`
2020-09-03 20:41:45 +02:00
xarantolus 94255fa0b1 [youtube] More general title extraction
Seems like this attribute is moved every few weeks, so we just extract both and use the one that is present.
2020-08-24 14:30:08 +02:00
xarantolus 7d743516b5 [youtube] Make ytcfg.set config extraction non-fatal
If the markup of the page changes in the future, it might be possible that _FEED_DATA still works, but the other regex does not. SInce it is not necessary for the first page of videos, we make sure the program doesn't exit before extracting them.

TL;DR: Extract the first video page even if there are problems
2020-08-24 14:29:16 +02:00
xarantolus 2ad7b6ace9 Merge branch 'fixYTSearch' of https://github.com/xarantolus/youtube-dl into fixYTSearch 2020-07-31 10:05:19 +02:00
xarantolus a5e386d9fe Fix python2 compatibility and title extraction 2020-07-31 10:05:11 +02:00
PhilippandGitHub d39cf56210 Merge branch 'master' into fixYTSearch 2020-07-30 16:41:07 +02:00
xarantolus 4f37c60bf5 Run formatter 2020-07-30 16:38:56 +02:00
xarantolus c449f70965 [youtube] Fix feed extraction
In order to extract videos from further pages, we need to get various variables that are in an argument to the `ytcfg.set` call in a script on the feed page.
2020-07-30 16:34:48 +02:00
xarantolus 7fa0a67cc1 Remove unused variable 2020-07-10 11:50:50 +02:00
xarantolus c37ca4732b [youtube] Remote download limit 2020-07-10 11:47:13 +02:00
xarantolus 5cbe7563be [youtube] Return to old feed extraction code as it *seems* like that change was reverted
The old code now works again, but it downloads without limit. This is why a limit of 1000 videos is added, it can be overwritten with the `--max-downloads` option - that way, only so many ids will be extracted as videos downloaded
2020-06-23 11:27:02 +02:00
xarantolus 6a3cc89394 [youtube] Make search extraction less dependent on json schema.
If an object looks like a video (it has a `videoId` key), assume that it is.
2020-06-23 08:56:21 +02:00
xarantolus b3fd4b155e run flake8 2020-06-21 09:41:42 +02:00
xarantolus 57f72370c5 [youtube] Fix feed extraction
This moves feed extraction from using html content to json metadata. However, loading additional pages no longer works.

The _extract_video_info function also returns a continuation object that contains some metadata that - together with an API key that is in the page source - might be used to request the next page.
2020-06-21 09:31:04 +02:00
xarantolus 6dad89289c [youtube] Move search URL extraction to appropriate extractor 2020-06-19 21:29:47 +02:00
xarantolus 7a74feda78 [youtube] Fix extraction of search urls (closes ytdl-org/youtube-dl#25696) 2020-06-19 14:57:57 +02:00