mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 22:47:20 +08:00
regex fix for newer urls
This commit is contained in:
parent
b2771a2853
commit
f901daedf6
@ -119,8 +119,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
|
||||
# /201909/10/247477171/720P_1500K_247477171.mp4?rate=350k&burst=1600k&validfrom=1578384700&validto=1578399100&hash=0pse1EbrOQbQF%2FJjZgeLX4K%2F0qw%3D
|
||||
# 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…
x
Reference in New Issue
Block a user