This commit is contained in:
CodyZhang
2020-06-02 18:43:18 +08:00
parent e0656674ee
commit d21bfdea09
3 changed files with 6896 additions and 222 deletions

View File

@@ -1,8 +1,9 @@
from bs4 import BeautifulSoup
import requests
import re
import win32clipboard, win32con
first_page = 'https://tw.piaotian.cc/read/285398/66476921.html'
first_page = 'https://tw.piaotian.cc/read/285398/98006676.html'
domain = re.search('https://.+?/', first_page).group()
if domain[-1:] != "/":
@@ -21,9 +22,17 @@ if nextPageTag[:1] == "/":
nextPageTag = nextPageTag[1:]
nextPageLink = domain+nextPageTag
print(nextPageLink)
modifiedContent = novelContent.text.replace("    ", "")
print(modifiedContent)
print(nextPageLink)
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
win32clipboard.SetClipboardData(win32con.CF_UNICODETEXT, nextPageLink)
win32clipboard.CloseClipboard()
# print(novelTitle)
# print(novelContent.contents)
with open("fetched.txt", "w", encoding='utf-8') as f:

File diff suppressed because one or more lines are too long