Properly support simple titles in the newest InfoExtractors
This commit is contained in:
parent
bd3cdf6dc4
commit
31cbdaafd4
1 changed files with 6 additions and 3 deletions
|
@ -1034,6 +1034,7 @@ class GoogleIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
video_title = mobj.group(1).decode('utf-8')
|
video_title = mobj.group(1).decode('utf-8')
|
||||||
video_title = sanitize_title(video_title)
|
video_title = sanitize_title(video_title)
|
||||||
|
simple_title = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', video_title)
|
||||||
|
|
||||||
# Google Video doesn't show uploader nicknames?
|
# Google Video doesn't show uploader nicknames?
|
||||||
video_uploader = 'NA'
|
video_uploader = 'NA'
|
||||||
|
@ -1045,7 +1046,7 @@ class GoogleIE(InfoExtractor):
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader.decode('utf-8'),
|
'uploader': video_uploader.decode('utf-8'),
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'stitle': video_title,
|
'stitle': simple_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
})
|
})
|
||||||
except UnavailableFormatError:
|
except UnavailableFormatError:
|
||||||
|
@ -1111,6 +1112,7 @@ class PhotobucketIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
video_title = mobj.group(1).decode('utf-8')
|
video_title = mobj.group(1).decode('utf-8')
|
||||||
video_title = sanitize_title(video_title)
|
video_title = sanitize_title(video_title)
|
||||||
|
simple_title = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', video_title)
|
||||||
|
|
||||||
video_uploader = mobj.group(2).decode('utf-8')
|
video_uploader = mobj.group(2).decode('utf-8')
|
||||||
|
|
||||||
|
@ -1121,7 +1123,7 @@ class PhotobucketIE(InfoExtractor):
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'stitle': video_title,
|
'stitle': simple_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
})
|
})
|
||||||
except UnavailableFormatError:
|
except UnavailableFormatError:
|
||||||
|
@ -1199,6 +1201,7 @@ class GenericIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
video_title = mobj.group(1).decode('utf-8')
|
video_title = mobj.group(1).decode('utf-8')
|
||||||
video_title = sanitize_title(video_title)
|
video_title = sanitize_title(video_title)
|
||||||
|
simple_title = re.sub(ur'(?u)([^%s]+)' % simple_title_chars, ur'_', video_title)
|
||||||
|
|
||||||
# video uploader is domain name
|
# video uploader is domain name
|
||||||
mobj = re.match(r'(?:https?://)?([^/]*)/.*', url)
|
mobj = re.match(r'(?:https?://)?([^/]*)/.*', url)
|
||||||
|
@ -1214,7 +1217,7 @@ class GenericIE(InfoExtractor):
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'stitle': video_title,
|
'stitle': simple_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
})
|
})
|
||||||
except UnavailableFormatError:
|
except UnavailableFormatError:
|
||||||
|
|
Loading…
Reference in a new issue