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

Add support for spanish episodes on South Park #5525

Closed
dilworks opened this issue Apr 25, 2015 · 8 comments
Closed

Add support for spanish episodes on South Park #5525

dilworks opened this issue Apr 25, 2015 · 8 comments

Comments

@dilworks
Copy link

@dilworks dilworks commented Apr 25, 2015

South Park Studios just added their entire catalog of episodes dubbed to Latin American Spanish (http://southpark.cc.com/blog/2015/04/16/all-seasons-of-south-park-now-available-in-spanish), which is insanely great for us at the south of the border. However, youtube-dl can't deal with those as the URLs are slightly different.

After looking at the extractor source (southpark.py), the fix might be trivial:

_VALID_URL = r'https?://(www\.)?(?P<url>southpark\.cc\.com/(clips|full-episodes)/(?P<id>.+?)(\?|#|$))'

The path for the Spanish episodes is "episodios-en-espanol", so it may be just matter of adding that string to the valid URLs regex.

@dilworks
Copy link
Author

@dilworks dilworks commented Apr 25, 2015

The suggested regex fix (just add "episodios-en-espanol" to the valid URLs regex) indeed does the work:

Sample URL: http://southpark.cc.com/episodios-en-espanol/s10e08-haz-el-amor-no-el-warcraft
Fix results:

tomman@tomman-lp-c2:~/workbench/tsdx-mbench/youtube-dl$ ./youtube-dl --list-formats http://southpark.cc.com/episodios-en-espanol/s10e08-haz-el-amor-no-el-warcraft
[southpark.cc.com] s10e08-haz-el-amor-no-el-warcraft: Downloading webpage
[southpark.cc.com] 5ff1eda8-ecfd-11e0-aca6-0026b9414f30: Downloading info
[southpark.cc.com] e50791a2-ed00-11e0-aca6-0026b9414f30: Extracting information
[southpark.cc.com] e50791a2-ed00-11e0-aca6-0026b9414f30: Downloading video urls
[southpark.cc.com] e507fd68-ed00-11e0-aca6-0026b9414f30: Extracting information
[southpark.cc.com] e507fd68-ed00-11e0-aca6-0026b9414f30: Downloading video urls
[southpark.cc.com] e50957d0-ed00-11e0-aca6-0026b9414f30: Extracting information
[southpark.cc.com] e50957d0-ed00-11e0-aca6-0026b9414f30: Downloading video urls
[download] Downloading playlist: None
[southpark.cc.com] playlist None: Collected 3 video ids (downloading 3 of them)
[download] Downloading video 1 of 3
[info] Available formats for e50791a2-ed00-11e0-aca6-0026b9414f30:
format code  extension  resolution note
300          mp4        384x216    
450          mp4        512x288    
700          mp4        768x432    
1000         mp4        960x540    
1200         mp4        1280x720   (best)
[download] Downloading video 2 of 3
[info] Available formats for e507fd68-ed00-11e0-aca6-0026b9414f30:
format code  extension  resolution note
300          mp4        384x216    
450          mp4        512x288    
700          mp4        768x432    
1000         mp4        960x540    
1200         mp4        1280x720   (best)
[download] Downloading video 3 of 3
[info] Available formats for e50957d0-ed00-11e0-aca6-0026b9414f30:
format code  extension  resolution note
300          mp4        384x216    
450          mp4        512x288    
700          mp4        768x432    
1000         mp4        960x540    
1200         mp4        1280x720   (best)
@dstftw dstftw closed this in e4a5e77 Apr 25, 2015
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 25, 2015

Episodios en espanol will be available in the next version. Thanks for the report.

@dilworks
Copy link
Author

@dilworks dilworks commented Apr 25, 2015

Odd, while testing the episodes stream with English audio, not with Spanish audio as expected.

I'll need to perform more testing to figure out how to pick the proper audio track.

@dilworks
Copy link
Author

@dilworks dilworks commented Apr 25, 2015

Found something:
When the playlist XML is requested from the server, there is a parameter in the URL where a language code is expected. In my case, the URL turns to be this:

/feeds/player/mediagen?uri=mgid:arc:video:southparkstudios.com:e50791a2-ed00-11e0-aca6-0026b9414f30&aspectRatio=16:9&lang=en&acceptMethods=fms

As we can see, "en" means "English, no matter that you've entered through a Spanish page". The expected language code for Spanish episodes is "sp" (yes, not "es"). Changing the language code yields the correct playlist. However, I don't know where to poke in the code for fixing this...

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 25, 2015

Too late. That's already implemented in a542e37 and e4a5e77.

@dilworks
Copy link
Author

@dilworks dilworks commented Apr 25, 2015

Any clues on how to use it then? I'm not familiar with the endless array of commandline options yet...

@dilworks
Copy link
Author

@dilworks dilworks commented Apr 25, 2015

Ah, OK, let me upgrade again, didn't noticed the full commit yet :D

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 26, 2015

This has been fixed in youtube-dl 2015.04.26. See our FAQ if you have problems updating.

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.