1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-29 19:47:54 +01:00

Added flashvars regex

This commit is contained in:
nindogo 2019-04-15 23:40:05 +03:00
parent 730f1692a0
commit e7a76dde02

View File

@ -2,6 +2,7 @@
from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..utils import (
@ -84,6 +85,16 @@ class PornTrexIE(InfoExtractor):
self._sort_formats(formats)
flashvars_regex = re.compile(
r'flashvars.*?(\{.*?\})',
flags=re.DOTALL
)
flashvars = json.loads(
re.findall(flashvars_regex, webpage)[0]
)
print(flashvars)
return {
'id': video_id,
'title': title,