-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[americastestkitchen] Fix metadata extraction for ATK episodes #27860
Conversation
FYI @remitamine this may be related to 17b0122 |
'release_date': unified_strdate(video.get('publishDate')), | ||
'upload_date': unified_strdate(video.get('publishDate')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line(will be calculated automatically from timestamp
).
@@ -33,6 +34,25 @@ class AmericasTestKitchenIE(InfoExtractor): | |||
'params': { | |||
'skip_download': True, | |||
}, | |||
}, { | |||
'url': 'https://www.americastestkitchen.com/episode/705-simple-chicken-dinner', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment on why this test has been added.
'episode_number': episode.get('number'), | ||
'season_number': episode.get('season'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use int_or_none
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for episode_number
(both lines where highlighted).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake. Just fixed this!
94defe7
to
9130ebc
Compare
@@ -80,11 +83,10 @@ def _real_extract(self, url): | |||
'url': 'https://player.zype.com/embed/%s.js?api_key=jZ9GUhRmxcPvX7M3SlfejB6Hle9jyHTdk2jVxG7wOHPLODgncEKVdPYBhuz9iWXQ' % video['zypeId'], | |||
'ie_key': 'Zype', | |||
'description': clean_html(video.get('description')), | |||
'timestamp': parse_iso8601(video.get('publishDate')), | |||
'timestamp': unified_timestamp(video.get('publishDate')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp was not a valid iso8601 timestamp. This fixes that issue and the timestamp
in the second test case proves it
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])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:
What is the purpose of your pull request?
Description of your pull request and other information
Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.
Although the API does not appear to have changed between episode 582 and episode 705, the existing code fails to extract the metadata correctly for episode 705. This PR updates the metadata extraction to work well with the ATK api.