20200602
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user