File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 11chromedriver
22.txt
3+ __pycache__
Original file line number Diff line number Diff line change 11import lxml .html
2- from pytest import importorskip
32import requests
4- import re
3+ import re
4+ import math
55
66
77compilado = re .compile ('("[\/A-z0-9\+(%)\-." ]+)' )
88# (\([1-9 % +]+\))
99
10+
1011def zshared (link : str ) -> str :
1112 response = requests .get (link )
1213 URL = response .url .split ('/v' )[0 ]
1314 parser = lxml .html .fromstring (response .text )
1415
1516 javascript = parser .xpath ('//script[@type="text/javascript"]' )[5 ].text
16- javascript = re .search (compilado , javascript ).group (0 ).replace ('+ (' , '+ str(' )
17- download_path = eval (javascript )
18- return URL + download_path
17+ base = int (javascript .split ()[3 ].replace (';' , '' ))
18+ before_path = javascript .split ()[- 3 ].split ('"' )[1 ]
19+ after_path = javascript .split ()[- 2 ].split ('"' )[1 ]
20+ number_path = str (int (math .pow (base , 3 ) + 3 ))
21+
22+ return URL + before_path + number_path + after_path
23+
1924
25+ #breakpoint()
26+ zshared ('https://www38.zippyshare.com/v/zHYZqNnZ/file.html' )
You can’t perform that action at this time.
0 commit comments