-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
[scientology] Add new extractor #16184
Conversation
webpage = self._download_webpage(url, video_id) | ||
|
||
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title').strip() | ||
description = self._html_search_regex(r'<meta name="description" content="(.+?)" />', webpage, 'description').strip() |
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.
_html_search_meta
.
webpage = self._download_webpage(url, video_id) | ||
|
||
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title').strip() | ||
description = self._html_search_regex(r'<meta name="description" content="(.+?)" />', webpage, 'description').strip() |
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.
Bother to read coding conventions on optional meta fields.
|
||
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title').strip() | ||
description = self._html_search_regex(r'<meta name="description" content="(.+?)" />', webpage, 'description').strip() | ||
description = re.sub("[^a-zA-Z0-9.,_\s-]+", " ", description) |
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.
No.
|
||
# changing address for extration url | ||
extract_ext = re.search(r'<episode-video>(.*?)</episode-video>', webpage).group(0) | ||
extract_ext = extract_ext.replace('<episode-video>', '').replace('</episode-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.
_search_regex
.
# changing address for extration url | ||
extract_ext = re.search(r'<episode-video>(.*?)</episode-video>', webpage).group(0) | ||
extract_ext = extract_ext.replace('<episode-video>', '').replace('</episode-video>', '') | ||
url = url[:url.find('/', 10)] + extract_ext |
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.
urljoin
.
7b956a1
to
5e26784
Compare
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
Added a new extractor for scientology.tv for this issue