Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
7325156 authored Oct 30, 2024
1 parent 7eb376b commit 56a1cc5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exe整合版/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MyWindow(QMainWindow, jjurl.Ui_MainWindow):
req_url_base = 'http://www.jjwxc.net/onebook.php?novelid='

# 头文件,可用来登陆,cookie可在浏览器或者client.py中获取
hheaders = {"User-Agent": "Dalvik/2.1.0"}
headerss = {"User-Agent": "Dalvik/2.1.0"}

percent = 0
index = [] # 目录
Expand Down Expand Up @@ -250,6 +250,7 @@ def get_sin(self, l):
chapcot = 100
while badgateway and chapcot > 0:
chlink = l
self.headerss={"User-Agent":"Mobile "+time.asctime()}
chcont = {'chapterSize': '', 'chapterDate': '', 'sayBody': '', 'upDown': '', 'content': ''}
chcot = requests.get(chlink, headers=self.headerss)
try:
Expand Down Expand Up @@ -451,7 +452,9 @@ def get_txt(self, txt_id, threadnum):
apivol = 'https://app.jjwxc.net/androidapi/chapterList?novelId=' + nid + '&more=0&whole=1'

# 通过cookie获取文章信息
self.headerss={"User-Agent":"Mobile "+time.asctime()}
res = requests.get(req_url, headers=self.headerss)
self.headerss={"User-Agent":"Mobile "+time.asctime()}
apires = requests.get(apireq, headers=self.headerss)
apicont = json.loads(apires.text)
if "message" in apicont and not "novelIntro" in apicont:
Expand All @@ -470,6 +473,7 @@ def get_txt(self, txt_id, threadnum):

else:
# 获取目录
self.headerss={"User-Agent":"Mobile "+time.asctime()}
rc = requests.get(apivol, headers=self.headerss)
cdic = json.loads(rc.text)
cdic = cdic["chapterlist"]
Expand Down

0 comments on commit 56a1cc5

Please sign in to comment.