fix(lightnovel): 尝试修复轻小说推荐功能

This commit is contained in:
ClovertaTheTrilobita 2025-02-15 16:26:55 +08:00
parent da5d1af48c
commit 6d6966f1b3

View file

@ -5,12 +5,12 @@ from bs4 import BeautifulSoup
from src.configs.api_config import wenku8_username, wenku8_password
# 登录页面的URL
login_url = 'https://www.wenku8.cc/login.php?jumpurl=http%3A%2F%2Fwww.wenku8.net%2Findex.php'
index_url = 'https://www.wenku8.cc/index.php'
login_url = 'https://www.wenku8.net/login.php?jumpurl=http%3A%2F%2Fwww.wenku8.net%2Findex.php'
index_url = 'https://www.wenku8.net/index.php'
headers = {
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
'Connection': 'keep-alive',
'Connection': 'close',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0',
'Upgrade-Insecure-Requests': '1'
}
@ -51,7 +51,7 @@ async def get_books():
with open('wenku8.cookie', 'r') as f:
cookie = f.read()
headers1 = {
'Connection': 'keep-alive',
'Connection': 'close',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0',
'Upgrade-Insecure-Requests': '1',
'Cookie': cookie