-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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] Add support for alternative urls. #22471
Conversation
Add support for alternative xvideos urls.
youtube_dl/extractor/xvideos.py
Outdated
@@ -17,7 +17,8 @@ class XVideosIE(InfoExtractor): | |||
_VALID_URL = r'''(?x) | |||
https?:// | |||
(?: | |||
(?:www\.)?xvideos\.com/video| | |||
(?:(?:fr|it|de|www)\.)?xvideos2?\.com/video| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more country domains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more country domains
When I wrote the regex, I used the html code from the https://xvideos.com main page. A part from 'fr', 'it' and 'de' xvideos.com subdomains and xvideos.es there were no other country domains.
All other countries lead to www.xvideos2.com.
Here is an excerpt from this html code (as of 2019-09-28)
<link rel="alternate" href="https://www.xvideos.com/" hreflang="x-default" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="en-IN" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="hi" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="bn" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="mr" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="te" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="ta" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="kn" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="gu" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="or" />
<link rel="alternate" href="https://www.xvideos2.com/" hreflang="ml" />
<link rel="alternate" href="https://www.xvideos.es/" hreflang="es" />
<link rel="alternate" href="https://fr.xvideos.com/" hreflang="fr" />
<link rel="alternate" href="https://it.xvideos.com/" hreflang="it" />
<link rel="alternate" href="https://de.xvideos.com/" hreflang="de" />
As of this writing, https://www.xvideos.cm/ exists. However it seems to be a chaturbate like website. xvideos.desi is a parked domain.
@dstftw Do you see any other country domain needing to be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jp also exists
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
ytdl doesn't recognize xvideos urls like the one below :
https://fr.xvideos.com/video13287221/
Did you notice the 'fr' subdomain before 'xvideos.com' domain ?
This patch addresses this issue and other alternative valid xvideos urls rejected by youtube-dl.
xvideos2.com, xvideos.es, it.xvideos.com, de.xvideos.com.