From cc749aeb5c30309f2b90118c92eb6b93481acce6 Mon Sep 17 00:00:00 2001 From: girst Date: Sat, 24 Oct 2020 16:14:42 +0200 Subject: [PATCH] polish some stuff --- app/common/common.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/common/common.py b/app/common/common.py index 48fb686..0b61886 100644 --- a/app/common/common.py +++ b/app/common/common.py @@ -265,12 +265,11 @@ def get_video_info(video_id, sts=0, algo=""): else: return None, None, metadata, 'exhausted', player_error -def unscramble(cipher, algo): # test video id: UxxajLWwzqY +def unscramble(cipher, algo): signature = list(cipher['s'][0]) for c in algo.split(): op, ix = re.match(r"([rsw])(\d+)?", c).groups() ix = int(ix) % len(signature) if ix else 0 - if not op: continue if op == 'r': signature = list(reversed(signature)) if op == 's': signature = signature[ix:] if op == 'w': signature[0], signature[ix] = signature[ix], signature[0] -- 2.39.3