aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-06-26 15:17:26 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-06-26 15:17:26 +0800
commit30105f4ac0291bd3e1350a5bb383e88e260b9ad9 (patch)
tree46bfa343f27e7721a3ec1fd544364dde612dda5e /youtube_dl
parent1143535d762fc4260aacc108f2c41079867f9f00 (diff)
[le] Move urshift() to utils.py
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/leeco.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/youtube_dl/extractor/leeco.py b/youtube_dl/extractor/leeco.py
index 63f581cd9..959d71617 100644
--- a/youtube_dl/extractor/leeco.py
+++ b/youtube_dl/extractor/leeco.py
@@ -23,6 +23,7 @@ from ..utils import (
sanitized_Request,
str_or_none,
url_basename,
+ urshift,
)
@@ -74,15 +75,11 @@ class LeIE(InfoExtractor):
'only_matching': True,
}]
- @staticmethod
- def urshift(val, n):
- return val >> n if val >= 0 else (val + 0x100000000) >> n
-
# ror() and calc_time_key() are reversed from a embedded swf file in KLetvPlayer.swf
def ror(self, param1, param2):
_loc3_ = 0
while _loc3_ < param2:
- param1 = self.urshift(param1, 1) + ((param1 & 1) << 31)
+ param1 = urshift(param1, 1) + ((param1 & 1) << 31)
_loc3_ += 1
return param1