[pornhub] Dismiss tbr extracted from download URLs (closes #28927)
No longer reliable
This commit is contained in:
parent
2ccee8db74
commit
da32828208
@ -408,17 +408,14 @@ class PornHubIE(PornHubBaseIE):
|
|||||||
format_url, video_id, 'mp4', entry_protocol='m3u8_native',
|
format_url, video_id, 'mp4', entry_protocol='m3u8_native',
|
||||||
m3u8_id='hls', fatal=False))
|
m3u8_id='hls', fatal=False))
|
||||||
return
|
return
|
||||||
tbr = None
|
if not height:
|
||||||
mobj = re.search(r'(?P<height>\d+)[pP]?_(?P<tbr>\d+)[kK]', format_url)
|
height = int_or_none(self._search_regex(
|
||||||
if mobj:
|
r'(?P<height>\d+)[pP]?_\d+[kK]', format_url, 'height',
|
||||||
if not height:
|
default=None))
|
||||||
height = int(mobj.group('height'))
|
|
||||||
tbr = int(mobj.group('tbr'))
|
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': format_url,
|
'url': format_url,
|
||||||
'format_id': '%dp' % height if height else None,
|
'format_id': '%dp' % height if height else None,
|
||||||
'height': height,
|
'height': height,
|
||||||
'tbr': tbr,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
for video_url, height in video_urls:
|
for video_url, height in video_urls:
|
||||||
@ -440,7 +437,8 @@ class PornHubIE(PornHubBaseIE):
|
|||||||
add_format(video_url, height)
|
add_format(video_url, height)
|
||||||
continue
|
continue
|
||||||
add_format(video_url)
|
add_format(video_url)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(
|
||||||
|
formats, field_preference=('height', 'width', 'fps', 'format_id'))
|
||||||
|
|
||||||
video_uploader = self._html_search_regex(
|
video_uploader = self._html_search_regex(
|
||||||
r'(?s)From: .+?<(?:a\b[^>]+\bhref=["\']/(?:(?:user|channel)s|model|pornstar)/|span\b[^>]+\bclass=["\']username)[^>]+>(.+?)<',
|
r'(?s)From: .+?<(?:a\b[^>]+\bhref=["\']/(?:(?:user|channel)s|model|pornstar)/|span\b[^>]+\bclass=["\']username)[^>]+>(.+?)<',
|
||||||
|
Loading…
Reference in New Issue
Block a user