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

xvideos not working (patch to fix) #370

Closed
pocoimporta opened this issue Jul 5, 2012 · 3 comments
Closed

xvideos not working (patch to fix) #370

pocoimporta opened this issue Jul 5, 2012 · 3 comments
Labels

Comments

@pocoimporta
Copy link

@pocoimporta pocoimporta commented Jul 5, 2012

Xvideos changed the location of the video thumbnail. The following patch fixes the problem:

--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -2357,7 +2357,7 @@ class XVideosIE(InfoExtractor):


                # Extract video thumbnail
-               mobj = re.search(r'http://(?:img.*?\.)xvideos.com/videos/thumbs/[a-fA-F0-9]/[a-fA-F0-9]/[a-fA-F0-9]/([a-fA-F0-
+               mobj = re.search(r'http://(?:img.*?\.)xvideos.com/videos/thumbs/[a-fA-F0-9]+/[a-fA-F0-9]+/[a-fA-F0-9]+/[a-fA-F
                if mobj is None:
                        self._downloader.trouble(u'ERROR: unable to extract video thumbnail')
                        return
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Jul 6, 2012

Thanks! But the patch is cropped on the right ^^

@pocoimporta
Copy link
Author

@pocoimporta pocoimporta commented Jul 7, 2012

Oh, sorry about that. There it goes again:

diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index baf859e..01ec034 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -2357,7 +2357,7 @@ class XVideosIE(InfoExtractor):


        # Extract video thumbnail
-       mobj = re.search(r'http://(?:img.*?\.)xvideos.com/videos/thumbs/[a-fA-F0-9]/[a-fA-F0-9]/[a-fA-F0-9]/([a-fA-F0-9.]+jpg)', webpage)
+       mobj = re.search(r'http://(?:img.*?\.)xvideos.com/videos/thumbs/[a-fA-F0-9]+/[a-fA-F0-9]+/[a-fA-F0-9]+/[a-fA-F0-9]+/([a-fA-F0-9.]+jpg)', webpage)
        if mobj is None:
            self._downloader.trouble(u'ERROR: unable to extract video thumbnail')
            return
@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Jul 30, 2012

Merged it with a small additional fix. Thank you!

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.