-
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
[funimation] Extract more format info from site #9515
Conversation
youtube_dl/extractor/funimation.py
Outdated
query = compat_parse_qs(compat_urllib_parse_urlparse(url).query) | ||
preference = None | ||
if query.get('watch') is not None and len(query.get('watch')) > 0: | ||
preference = query.get('watch')[-1] |
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.
This can be simplified to query.get('watch', [None])[-1]
.
Add some tests for series related fields.
Add a test for that also. Squash commits when done. |
Thanks for the review. I'll make the changes once I have a chance. |
89853da
to
1d42635
Compare
@dstftw did I miss anything? I don't see any further comments. |
youtube_dl/extractor/funimation.py
Outdated
.format(playlist.get('showId'), pagenum * 20)) | ||
request.add_header('User-Agent', user_agent) | ||
episode_list = self._download_json( | ||
request, display_id, 'Downloading episode list from {}'.format(pagenum * 20))['main'] |
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.
{}
does not work in python 2.6.
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.
Compatibility kicks me in the ass again. Will fix quickly. (And sorry for not testing 2.6. I forgot on the last commit.)
Use the JSON playlist information provided by Funimation to extract more attributes about the stream formats, such as season and episode number. Also fixed the returned video information to use the 'series' key rather than the 'artist' key, the latter of which is meant for albums. Also, determine whether the user supplied the subtitle or English dub URL based on the query parameters, and set the language preference based on that and the site-provided stream info.
Add new InfoExtractor for Funimation series and video pages to make playlists of all videos in a series, similar to the existing CrunchyrollShowPlaylistIE class. Also adjusted the tests for both Funimation extractors to match pages that actually exist.
747751a
to
e82d98c
Compare
@dstftw Friendly ping |
Nice work @Parent5446! However, I noticed a few issues when using this patch:
|
Use the JSON playlist information provided by Funimation to extract more
attributes about the stream formats, such as season and episode
number. Also fixed the returned video information to use the 'series'
key rather than the 'artist' key, the latter of which is meant for
albums.
Also, determine whether the user supplied the subtitle or English dub
URL based on the query parameters, and set the language preference based
on that and the site-provided stream info.