-
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
[pear] Add new extractor #13031
[pear] Add new extractor #13031
Conversation
Check code with flake8 an squash commits. |
youtube_dl/extractor/pear.py
Outdated
|
||
title = self._html_search_regex(r'<h1[^>]+class="video-tt">(.+)</h1>', webpage, 'title') | ||
description = self._html_search_regex(r'<div[^>]+class="summary"[^>]*>([^<]+)<', webpage, 'description', fatal=False) | ||
hdUrl = self._html_search_regex(r'hdUrl="(.*?)"', webpage, '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.
All formats should be extracted.
youtube_dl/extractor/pear.py
Outdated
video_id = self._match_id(url) | ||
webpage = self._download_webpage(url, video_id) | ||
|
||
title = self._html_search_regex(r'<h1[^>]+class="video-tt">(.+)</h1>', webpage, 'title') |
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.
Should not be greedy.
'ext': 'mp4', | ||
'title': '小浣熊在主人家玻璃上滚石头:没砸', | ||
'description': '小浣熊找到一个小石头,仿佛发现了一个宝贝。它不停地用石头按在玻璃上,滚来滚去,吸引主人注意。', | ||
'url': 'http://video.pearvideo.com/mp4/short/20170508/cont-1076290-10438018-hd.mp4' |
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.
Do you want to be credited as one of the authors of youtube-dl? If so under what name? |
@dstftw It's my pleasure, thanks for your kindness~ My name is Tang Rui. |
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
http://www.pearvideo.com
, which is a popular short video website in China.