|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import base64
|
|
|
|
import itertools
|
|
|
|
import itertools
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
|
@ -12,6 +13,7 @@ from ..utils import (
|
|
|
|
int_or_none,
|
|
|
|
int_or_none,
|
|
|
|
parse_duration,
|
|
|
|
parse_duration,
|
|
|
|
str_or_none,
|
|
|
|
str_or_none,
|
|
|
|
|
|
|
|
try_call,
|
|
|
|
try_get,
|
|
|
|
try_get,
|
|
|
|
unified_strdate,
|
|
|
|
unified_strdate,
|
|
|
|
url_or_none,
|
|
|
|
url_or_none,
|
|
|
@ -229,6 +231,11 @@ class XHamsterIE(InfoExtractor):
|
|
|
|
standard_url = standard_format.get(standard_format_key)
|
|
|
|
standard_url = standard_format.get(standard_format_key)
|
|
|
|
if not standard_url:
|
|
|
|
if not standard_url:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
decoded = try_call(lambda: base64.b64decode(standard_url))
|
|
|
|
|
|
|
|
if decoded and decoded[:4] == b'xor_':
|
|
|
|
|
|
|
|
standard_url = bytes(
|
|
|
|
|
|
|
|
a ^ b for a, b in
|
|
|
|
|
|
|
|
zip(decoded[4:], itertools.cycle(b'xh7999'))).decode()
|
|
|
|
standard_url = urljoin(url, standard_url)
|
|
|
|
standard_url = urljoin(url, standard_url)
|
|
|
|
if not standard_url or standard_url in format_urls:
|
|
|
|
if not standard_url or standard_url in format_urls:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|