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

Funny or Die broken? #604

Closed
Vladinator opened this issue Dec 27, 2012 · 2 comments
Closed

Funny or Die broken? #604

Vladinator opened this issue Dec 27, 2012 · 2 comments

Comments

@Vladinator
Copy link

@Vladinator Vladinator commented Dec 27, 2012

youtube-dl "http://www.funnyordie.com/videos/0732f586d7/heart-shaped-box-literal-video-version"
WARNING: Falling back on generic information extractor.
[generic] heart-shaped-box-literal-video-version: Downloading webpage
[generic] heart-shaped-box-literal-video-version: Extracting information
ERROR: Invalid URL: http://www.funnyordie.com/videos/0732f586d7/heart-shaped-box-literal-video-version

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Dec 29, 2012

Do not ask me why, but named regex groups break it on my system, too, but not on Travis.
This patch fixes it, but this is not the right solution...

diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index e3cf7e1..c403bb1 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -3652,7 +3652,7 @@ class JustinTVIE(InfoExtractor):
         return info

 class FunnyOrDieIE(InfoExtractor):
-    _VALID_URL = r'^(?:https?://)?(?:www\.)?funnyordie\.com/videos/(?P<id>[0-9a-f]+)/.*$'
+    _VALID_URL = r'^(?:https?://)?(?:www\.)?funnyordie\.com/videos/([0-9a-f]+)/.*$'
     IE_NAME = u'FunnyOrDie'

     def report_extraction(self, video_id):
@@ -3664,7 +3664,7 @@ class FunnyOrDieIE(InfoExtractor):
             self._downloader.trouble(u'ERROR: invalid URL: %s' % url)
             return

-        video_id = mobj.group('id')
+        video_id = mobj.group(1)
         self.report_extraction(video_id)
         try:
             urlh = compat_urllib_request.urlopen(url)
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Dec 29, 2012

Aww, wait, forget what I've just said. I wan on the wrong git HEAD or something (I need sleep).

@Vladinator It is ready only in the git repo, so you will need to clone it and make youtube-dl, or wait for the next release and update.

Reopen the issue if you don't find it fixed this way!

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.