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

prosiebensat1.py extractor does not support Austrian ccTLD (.at) URLs #5786

Closed
z1atk0 opened this issue May 23, 2015 · 0 comments
Closed

prosiebensat1.py extractor does not support Austrian ccTLD (.at) URLs #5786

z1atk0 opened this issue May 23, 2015 · 0 comments
Labels

Comments

@z1atk0
Copy link

@z1atk0 z1atk0 commented May 23, 2015

All supported URLs of the prosiebensat1.py extractor also have an Austrian ccTLD variant, ie. if you call the (German ccTLD) URL http://www.prosieben.de from Austria, you get redirected to http://www.prosieben.at. Same goes for http://www.sat1.de -> http://www.sat1.at, http://www.sixx.de -> http://www.sixx.at, and so on. The extractor thinks these URLs are invalid, though, as it only knows about the German ccTLD variants.

Example:

[zlatko@disclosure]:~$ youtube-dl -F "http://www.sat1.at/tv/newtopia/videos/162-besuch-von-kathy-kelly-ganze-folge"
[generic] 162-besuch-von-kathy-kelly-ganze-folge: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 162-besuch-von-kathy-kelly-ganze-folge: Downloading webpage
[generic] 162-besuch-von-kathy-kelly-ganze-folge: Extracting information
ERROR: Unsupported URL: http://www.sat1.at/tv/newtopia/videos/162-besuch-von-kathy-kelly-ganze-folge

The enclosed trivial patch fixes this problem:

diff -pruN youtube-dl-orig/youtube_dl/extractor/prosiebensat1.py youtube-dl/youtube_dl/extractor/prosiebensat1.py
--- youtube-dl-orig/youtube_dl/extractor/prosiebensat1.py   2015-04-26 22:44:31.000000000 +0200
+++ youtube-dl/youtube_dl/extractor/prosiebensat1.py    2015-05-23 06:32:42.000000000 +0200
@@ -17,7 +17,7 @@ from ..utils import (
 class ProSiebenSat1IE(InfoExtractor):
     IE_NAME = 'prosiebensat1'
     IE_DESC = 'ProSiebenSat.1 Digital'
-    _VALID_URL = r'https?://(?:www\.)?(?:(?:prosieben|prosiebenmaxx|sixx|sat1|kabeleins|ran|the-voice-of-germany)\.de|fem\.com)/(?P<id>.+)'
+    _VALID_URL = r'https?://(?:www\.)?(?:(?:prosieben|prosiebenmaxx|sixx|sat1|kabeleins|ran|the-voice-of-germany)\.(?:de|at)|fem\.com)/(?P<id>.+)'

     _TESTS = [
         {

Result:

[zlatko@disclosure]:~$ youtube-dl-prosieben -F "http://www.sat1.at/tv/newtopia/videos/162-besuch-von-kathy-kelly-ganze-folge"
[prosiebensat1] tv/newtopia/videos/162-besuch-von-kathy-kelly-ganze-folge: Downloading webpage
[prosiebensat1] 3820852: Downloading videos JSON
[prosiebensat1] 3820852: Downloading sources JSON
[prosiebensat1] 3820852: Downloading urls JSON
[info] Available formats for 3820852:
format code     extension  resolution note
akamai_840000   mp4        unknown     840k
akamai_1200000  mp4        unknown    1200k
akamai_1600000  mp4        unknown    1600k (best)
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.