-
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
[sonosfm] Add new extractor #17891
[sonosfm] Add new extractor #17891
Conversation
video_id = self._match_id(url) | ||
webpage = self._download_webpage(url, video_id) | ||
|
||
player_url = self._html_search_regex(r'<meta property=\"og:video\" content=\"(.*)\"/>', webpage, 'player_url') |
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.
_og_search_video_url
.
'title': self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title'), | ||
'description': self._og_search_description(webpage), | ||
'url': m3u8_playlist, | ||
'thumbnail': self._html_search_regex(r'<meta property=\"og:image\" content=\"(.*)\"\s?/>', webpage, 'image') |
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.
_og_search_thumbnail
.- Read coding conventions on optional meta fields.
'id': video_id, | ||
'title': self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title'), | ||
'description': self._og_search_description(webpage), | ||
'url': m3u8_playlist, |
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.
_extract_m3u8_formats
.
|
||
player_url = self._html_search_regex(r'<meta property=\"og:video\" content=\"(.*)\"/>', webpage, 'player_url') | ||
file_name = self._search_regex( | ||
r'https://www.sonus.fm/jwplayer/player.swf\?file=mp4:([A-z0-9-.]*)&', |
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.
- Escape dots.
- Do not capture empty string.
- Relax regex.
7b956a1
to
5e26784
Compare
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
Added extractor sonos.fm (accidently called the branch sonUs.fm)