Skip to content

Commit

Permalink
修改url加密magic数
Browse files Browse the repository at this point in the history
  • Loading branch information
AuYang261 committed Aug 14, 2024
1 parent ff4a2db commit d6560db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion m3u8dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
workDir,
name,
max_workers=32,
num_retries=999,
num_retries=99,
base64_key=None,
progress_callback=dummy_func,
):
Expand Down
7 changes: 4 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
import os


# 在延河课堂网站的main.js中4937号的O[N(149, 270, 240, 274)]["k"]()函数的返回值
magic = "1138b69dfef641d9d7ba49137d2d4875"
headers = {
"Origin": "https://www.yanhekt.cn",
"Referer": "https://www.yanhekt.cn/",
"xdomain-client": "web_user",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26",
"Xdomain-Client": "web_user",
"Xclient-Signature": "e6e3bf5851b0e4af888cb4bc1938c568",
"Xclient-Signature": md5((magic + "_v1_undefined").encode()).hexdigest(),
"Xclient-Version": "v1",
"Xclient-Timestamp": str(int(time.time())),
"Authorization": "",
}
magic = "1tJrMwNq3h0yLgx86Rued2J1tFc"


def auth_prompt(code=True):
Expand All @@ -33,7 +34,7 @@ def auth_prompt(code=True):

def encryptURL(url):
url_list = url.split("/")
# "a97f12c055a10ee51d60e441e618bfef"
# "c3d47d7b3aa8caf2983b313cb6cd142f"
url_list.insert(-1, md5((magic + "_100").encode()).hexdigest())
return "/".join(url_list)

Expand Down

0 comments on commit d6560db

Please sign in to comment.