Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bbc] Extract more metadata for window.__INITIAL_DATA__ pages #28774

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

dirkf
Copy link
Contributor

@dirkf dirkf commented Apr 17, 2021

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Pages with metadata extracted from a JSON object assigned to window.INITIAL_DATA didn't extract timestamp and description. At least for the type where the metadata is in the media-experience object, this PR adds those items.

Examples:

youtube_dl/extractor/bbc.py Outdated Show resolved Hide resolved
youtube_dl/extractor/bbc.py Outdated Show resolved Hide resolved
youtube_dl/extractor/bbc.py Outdated Show resolved Hide resolved
youtube_dl/extractor/bbc.py Outdated Show resolved Hide resolved
@dirkf dirkf requested a review from dstftw April 17, 2021 16:17
youtube_dl/extractor/bbc.py Outdated Show resolved Hide resolved
@dirkf dirkf closed this Apr 17, 2021
@dirkf dirkf reopened this Apr 18, 2021
@dirkf
Copy link
Contributor Author

dirkf commented Apr 18, 2021

Weirdly the changes were overwritten, but now restored,

ext and upload_date are required
@dirkf dirkf requested a review from dstftw April 18, 2021 08:29
@dstftw dstftw merged commit 41920fc into ytdl-org:master Apr 20, 2021
@dirkf
Copy link
Contributor Author

dirkf commented Apr 20, 2021

Thanks for your work, Sergey.

github-actions bot added a commit to hellopony/youtube-dl that referenced this pull request Apr 21, 2021
* https://github.com/ytdl-org/youtube-dl:
  [youtube] Remove unused code
  [go] Improve video id extraction (closes ytdl-org#25207, closes ytdl-org#25216, closes ytdl-org#26058)
  [test_execution] Add test for lazy extractors (refs ytdl-org#28780)
  [test_youtube_misc] Move YoutubeIE.extract_id test into separate module
  [youtube] Fix lazy extractors (closes ytdl-org#28780)
  [bbc] Extract full description from __INITIAL_DATA__ (refs ytdl-org#28774)
  [bbc] Extract description and timestamp from __INITIAL_DATA__ (ytdl-org#28774)
@dirkf dirkf deleted the df-initialmetadata-patch branch June 30, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants