314kabinet-_-

MAIL @CLOUD link •DIRECT LINK•

May 8th, 2022 (edited)
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.67 KB | None | 0 0
  1. ᴅᴇꜰ ᴄᴍ_ɢᴇᴛ_ɪɴꜰᴏ(ᴜʀʟ):
  2.     ɪᴍᴘᴏʀᴛ ᴊꜱᴏɴ
  3.     ɪᴍᴘᴏʀᴛ ᴜʀʟʟɪʙ.ʀᴇꞯᴜᴇꜱᴛ
  4.     ɪᴍᴘᴏʀᴛ ʀᴇ
  5.     ᴅᴇꜰ ʙᴇᴛwᴇᴇɴ(ꜱᴛᴀʀᴛ, ᴇɴᴅ, ꜱᴛʀɪɴɢ):
  6.         ʀᴇᴛᴜʀɴ ʀᴇ.ꜰɪɴᴅᴀʟʟ(ʀᴇ.ᴇꜱᴄᴀᴘᴇ(ꜱᴛᴀʀᴛ)+'(.*?)'+ʀᴇ.ᴇꜱᴄᴀᴘᴇ(ᴇɴᴅ), ꜱᴛʀɪɴɢ, ꜰʟᴀɢꜱ=ʀᴇ.DOTALL)[0]
  7.    
  8.     ʜᴇᴀᴅᴇʀꜱ = {
  9.         "Uꜱᴇʀ-Aɢᴇɴᴛ": ʀ"Mᴏzɪʟʟᴀ/5.0 (Wɪɴᴅᴏwꜱ NT 10.0; Wɪɴ64; x64; ʀᴠ:96.0) Gᴇᴄᴋᴏ/20100101 Fɪʀᴇꜰᴏx/96.0"
  10.     }
  11.     ʀᴇꜱᴘ = ᴜʀʟʟɪʙ.ʀᴇꞯᴜᴇꜱᴛ.ᴜʀʟᴏᴘᴇɴ(ᴜʀʟʟɪʙ.ʀᴇꞯᴜᴇꜱᴛ.Rᴇꞯᴜᴇꜱᴛ(ᴜʀʟ, ʜᴇᴀᴅᴇʀꜱ=ʜᴇᴀᴅᴇʀꜱ)).ʀᴇᴀᴅ().ᴅᴇᴄᴏᴅᴇ("UTF-8")
  12.     ᴅᴀᴛᴀ = ʙᴇᴛwᴇᴇɴ('<ꜱᴄʀɪᴘᴛ>wɪɴᴅᴏw.ᴄʟᴏᴜᴅSᴇᴛᴛɪɴɢꜱ =', ';</ꜱᴄʀɪᴘᴛ>', ʀᴇꜱᴘ).ʀᴇᴘʟᴀᴄᴇ('/', ʀ'\/')
  13.     ᴅᴀᴛᴀ = ʀᴇ.ꜱᴜʙ(ʀ'"[^"]+x3ᴄ.*?",', '"",', ᴅᴀᴛᴀ)
  14.     ʀᴇᴛᴜʀɴ ᴊꜱᴏɴ.ʟᴏᴀᴅꜱ(ᴅᴀᴛᴀ)
  15.  
  16. ᴅᴇꜰ ᴄᴍ_ɢᴇᴛ_ᴅɪʀᴇᴄᴛ_ʟɪɴᴋ(ᴜʀʟ):
  17.     ᴅᴀᴛᴀ = ᴄᴍ_ɢᴇᴛ_ɪɴꜰᴏ(ᴜʀʟ)
  18.     ʀᴇᴛᴜʀɴ "/".ᴊᴏɪɴ([
  19.         ᴅᴀᴛᴀ["ᴅɪꜱᴘᴀᴛᴄʜᴇʀ"]["wᴇʙʟɪɴᴋ_ɢᴇᴛ"][0]["ᴜʀʟ"],
  20.         ᴅᴀᴛᴀ["ʀᴇꞯᴜᴇꜱᴛ"]["wᴇʙʟɪɴᴋ"]
  21.     ])
  22.  
  23. ᴅɪʀᴇᴄᴛ_ʟɪɴᴋ = ᴄᴍ_ɢᴇᴛ_ᴅɪʀᴇᴄᴛ_ʟɪɴᴋ("ʜᴛᴛᴘꜱ://ᴄʟᴏᴜᴅ.ᴍᴀɪʟ.ʀᴜ/ᴘᴜʙʟɪᴄ/5ᴘᴏV/ᴄRDxAʙPEQ")
  24. ᴘʀɪɴᴛ(ᴅɪʀᴇᴄᴛ_ʟɪɴᴋ)
  25.  
  26. <🚫>                                                                                                  <<<:==><no format>
  27. def cm_get_info(url):
  28.     import json
  29.     import urllib.request
  30.     import re
  31.     def between(start, end, string):
  32.         return re.findall(re.escape(start)+'(.*?)'+re.escape(end), string, flags=re.DOTALL)[0]
  33.    
  34.     headers = {
  35.         "User-Agent": r"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0"
  36.     }
  37.     resp = urllib.request.urlopen(urllib.request.Request(url, headers=headers)).read().decode("UTF-8")
  38.     data = between('<script>window.cloudSettings =', ';</script>', resp).replace('/', r'\/')
  39.     data = re.sub(r'"[^"]+x3c.*?",', '"",', data)
  40.     return json.loads(data)
  41.  
  42. def cm_get_direct_link(url):
  43.     data = cm_get_info(url)
  44.     return "/".join([
  45.         data["dispatcher"]["weblink_get"][0]["url"],
  46.         data["request"]["weblink"]
  47.     ])
  48.  
  49. direct_link = cm_get_direct_link("https://cloud.mail.ru/public/5poV/cRDxAbPEQ")
  50. print(direct_link)
Add Comment
Please, Sign In to add comment