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

[escapist] Exception when determining formats #5597

Closed
PinkPandaKatie opened this issue May 4, 2015 · 1 comment
Closed

[escapist] Exception when determining formats #5597

PinkPandaKatie opened this issue May 4, 2015 · 1 comment

Comments

@PinkPandaKatie
Copy link

@PinkPandaKatie PinkPandaKatie commented May 4, 2015

It looks like Escapist has changed the way formats are handled. The current code requests lq, hq, and hd separately, but they all return the same list of videos, and now data['files']['videos'] is a list of dictionaries with resolution information, not just URLs.

This can be fixed temporarily by the following patch:

diff --git a/youtube_dl/extractor/escapist.py b/youtube_dl/extractor/escapist.py
index 8facf11..8a68b51 100644
--- a/youtube_dl/extractor/escapist.py
+++ b/youtube_dl/extractor/escapist.py
@@ -90,8 +90,8 @@ class EscapistIE(InfoExtractor):
             for i, v in enumerate(data['files']['videos']):

                 formats.append({
-                    'url': v,
-                    'format_id': determine_ext(v) + '_' + q + str(i),
+                    'url': v['src'],
+                    'format_id': determine_ext(v['src']) + '_' + q + str(i),
                     'quality': quality(q),
                 })

but this duplicates all of the supported formats and needs a more permanent fix.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 4, 2015

Will be fixed in the next version. Thanks for the report.

@dstftw dstftw closed this May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.