import requests
import time
import re
import os
import threading
from bs4 import BeautifulSoup
#用户配置
novalUrl = "https://www.example.com/10086/10000"
novalPath = "F:/noval/"
#系统配置,无需修改
novalWeb = "https://www.example.com/"
novalName = ""
urls = []
def get_chapters_urls():
global novalName
web=requests.get(novalUrl, timeout=30)
soup = BeautifulSoup(web.content,'html.parser',from_encoding='utf8')
lis = soup.find_all('a', class_="novalList")
for li in lis:
urls.append(li.attrs['href'])
novalName = soup.find('div',class_='book').find('a').get_text()
print(novalName,"total",len(urls), "chapters")
def pre_check():
if os.path.exists(novalPath+"TEMP/"):
pass
else:
os.makedirs(novalPath+"TEMP/")
def downl
03-28
1161

01-31
696
