代码拉取完成,页面将自动刷新
同步操作将从 wmenjoy/vms 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
from Crypto.Cipher import AES
from binascii import b2a_hex, b2a_hex
from Crypto import Random
import base64
import time
import datetime
from urllib import parse
from utils.tools import *
import json
import sys
# function oneTime(){
# let srvdate = new Date($.ajax({async: false}).getResponseHeader("Date"));
# let eTimes = srvdate.getTime() + 600000;
# let uTxt = CryptoJS.enc.Utf8.parse("{\"path\":\"" + vtracksrc0 + "\",\"expire\":" + eTimes.toString() + "}");
# let uKey = CryptoJS.enc.Utf8.parse("zevS%th@*8YWUm%K");
# let waiv = CryptoJS.enc.Utf8.parse("5080305495198718");
# var ttestvtrack = CryptoJS.AES.encrypt(uTxt,uKey,{
# iv: waiv,
# mode: CryptoJS.mode.CBC
# });
# vtracksrc = encodeURIComponent(ttestvtrack.ciphertext.toString(CryptoJS.enc.Base64));
# }
key=b'zevS%th@*8YWUm%K'
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
T=Tools()
def aesEncrypt(path):
BLOCK_SIZE=16
systime = int(time.mktime(datetime.datetime.now().timetuple()) * 1000)
etimes = systime + 600000
uTxt = "{\"path\":\"" + path + "\",\"expire\":" + str(etimes) + "}"
cipher = AES.new(key, AES.MODE_CBC, b'5080305495198718')
uTxt = pad(uTxt)
result = cipher.encrypt(uTxt.encode("utf-8"))
return parse.quote(base64.b64encode(result),safe='~()*!.\'')
if __name__ == '__main__':
header, body = T.getPage2(sys.argv[1])
titleList = re.findall(r"class=\"post-title\">([^<]*)",body)
if len(titleList) > 0:
title = titleList[0]
list = re.findall(r"\"src0\":\"([^\"]*)\"", body)
if len(list) > 0:
group="电影"
if len(list) > 1:
group=title
for item in list:
url = item.replace("\\","")
idx = url.rindex("/")
title = url[idx + 1:]
idx2 = title.rindex(".")
title = title[0:idx2].replace("_"," ")
result =aesEncrypt(url)
page = T.getPage("https://v.ddys.tv:19543/video?type=mix&id=" + result)
bodyJson = json.loads(page["body"])
print(group + "," +title + "," + bodyJson["url"])
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。