-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[ESPN] Include additional URL formats (fixes issue #13244) #13549
Conversation
youtube_dl/extractor/espn.py
Outdated
@@ -10,7 +10,7 @@ | |||
|
|||
|
|||
class ESPNIE(InfoExtractor): | |||
_VALID_URL = r'https?://(?:espn\.go|(?:www\.)?espn)\.com/video/clip(?:\?.*?\bid=|/_/id/)(?P<id>\d+)' | |||
_VALID_URL = r'https?://(?:(?:(\w+\.)+)?espn\.go|(?:www\.)?espn)\.com/(?:video/clip(?:\?.*?\bid=|/_/id/)|watch/player\?.*?\bid=)(?P<id>\d+)' |
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.
(\w+\.)
is captured for no purpose.- It's probably time to make regex verbose
(?x)
.
youtube_dl/extractor/espn.py
Outdated
}, | ||
'expected_warnings': ['Unable to download f4m manifest'], | ||
}, { | ||
'url': 'http://nonredline.sports.espn.go.com/video/clip?id=19744672', |
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.
only_matching
.
youtube_dl/extractor/espn.py
Outdated
}, | ||
'expected_warnings': ['Unable to download f4m manifest'], | ||
}, { | ||
'url': 'https://cdn.espn.go.com/video/clip/_/id/19771774', |
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.
only_matching
.
youtube_dl/extractor/espn.py
Outdated
}, | ||
'expected_warnings': ['Unable to download f4m manifest'], | ||
}, { | ||
'url': 'http://www.espn.com/watch/player?id=19141491', |
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.
only_matching
.
youtube_dl/extractor/espn.py
Outdated
}, | ||
'expected_warnings': ['Unable to download f4m manifest'], | ||
}, { | ||
'url': 'http://www.espn.com/watch/player?bucketId=257&id=19505875', |
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.
only_matching
.
I have applied the requested fixes, please review at your convenience. Thanks! |
Shall I make any further corrections for this PR? Thank you! |
youtube_dl/extractor/espn.py
Outdated
)\.com/ | ||
(?: | ||
video/clip(?:\?.*?\bid=|/_/id/)| | ||
watch/player\?.*?\bid= |
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.
Does not cover http://www.espn.com/watch/player/_/id/19141491.
youtube_dl/extractor/espn.py
Outdated
)\.com/ | ||
(?: | ||
video/clip(?:\?.*?\bid=|/_/id/)| | ||
watch/player(?:\?.*?\bid=|/_/id/) |
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.
Code duplication.
Good catch - I have updated the regex and added this URL to the test suite for this extractor. Please let me know if there are any other issues. Thanks! |
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?
Updated the regex for the [ESPN] extractor to include additional URL formats for videos featured on the site - issue #13244.
Cheers,
Parmjit V.