mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-30 23:52:54 +08:00
[youporn] Fix quality extraction (Closes #8758)
This commit is contained in:
parent
1315224cbb
commit
d627cec608
@ -101,8 +101,9 @@ class YouPornIE(InfoExtractor):
|
||||
}
|
||||
# Video URL's path looks like this:
|
||||
# /201012/17/505835/720p_1500k_505835/YouPorn%20-%20Sex%20Ed%20Is%20It%20Safe%20To%20Masturbate%20Daily.mp4
|
||||
# /201012/17/505835/vl_240p_240k_505835/YouPorn%20-%20Sex%20Ed%20Is%20It%20Safe%20To%20Masturbate%20Daily.mp4
|
||||
# We will benefit from it by extracting some metadata
|
||||
mobj = re.search(r'/(?P<height>\d{3,4})[pP]_(?P<bitrate>\d+)[kK]_\d+/', video_url)
|
||||
mobj = re.search(r'(?P<height>\d{3,4})[pP]_(?P<bitrate>\d+)[kK]_\d+/', video_url)
|
||||
if mobj:
|
||||
height = int(mobj.group('height'))
|
||||
bitrate = int(mobj.group('bitrate'))
|
||||
|
Loading…
Reference in New Issue
Block a user