mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 16:57:40 +00:00
DailymotionIE: fix the extraction of the video uploader and use _search_regex for getting it
This commit is contained in:
parent
377fdf5dde
commit
587c68b2cd
1 changed files with 4 additions and 10 deletions
|
@ -940,16 +940,10 @@ class DailymotionIE(InfoExtractor):
|
||||||
video_title = unescapeHTML(mobj.group('title'))
|
video_title = unescapeHTML(mobj.group('title'))
|
||||||
|
|
||||||
video_uploader = None
|
video_uploader = None
|
||||||
mobj = re.search(r'(?im)<span class="owner[^\"]+?">[^<]+?<a [^>]+?>([^<]+?)</a>', webpage)
|
video_uploader = self._search_regex([r'(?im)<span class="owner[^\"]+?">[^<]+?<a [^>]+?>([^<]+?)</a>',
|
||||||
if mobj is None:
|
# Looking for official user
|
||||||
# lookin for official user
|
r'<(?:span|a) .*?rel="author".*?>([^<]+?)</'],
|
||||||
mobj_official = re.search(r'<span rel="author"[^>]+?>([^<]+?)</span>', webpage)
|
webpage, 'video uploader')
|
||||||
if mobj_official is None:
|
|
||||||
self._downloader.report_warning(u'unable to extract uploader nickname')
|
|
||||||
else:
|
|
||||||
video_uploader = mobj_official.group(1)
|
|
||||||
else:
|
|
||||||
video_uploader = mobj.group(1)
|
|
||||||
|
|
||||||
video_upload_date = None
|
video_upload_date = None
|
||||||
mobj = re.search(r'<div class="[^"]*uploaded_cont[^"]*" title="[^"]*">([0-9]{2})-([0-9]{2})-([0-9]{4})</div>', webpage)
|
mobj = re.search(r'<div class="[^"]*uploaded_cont[^"]*" title="[^"]*">([0-9]{2})-([0-9]{2})-([0-9]{4})</div>', webpage)
|
||||||
|
|
Loading…
Reference in a new issue