sehuatang pdf 优化
This commit is contained in:
@@ -6,6 +6,11 @@ import mysql.connector
|
||||
from mysql.connector import Error
|
||||
from selenium.webdriver.common.by import By
|
||||
import undetected_chromedriver as uc
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
uc.Chrome.__del__ = lambda self: None
|
||||
except Exception:
|
||||
pass
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
@@ -3,6 +3,11 @@ import os
|
||||
import requests
|
||||
from io import BytesIO
|
||||
import undetected_chromedriver as uc
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
uc.Chrome.__del__ = lambda self: None
|
||||
except Exception:
|
||||
pass
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
@@ -166,10 +171,10 @@ def fetch_and_create_pdf(url):
|
||||
pass
|
||||
|
||||
|
||||
def pdf_file_path():
|
||||
def pdf_file_path_undetected():
|
||||
url = 'https://www.sehuatang.net/forum.php?mod=forumdisplay&fid=103&filter=typeid&typeid=481'
|
||||
return fetch_and_create_pdf(url)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pdf_file_path()
|
||||
pdf_file_path_undetected()
|
||||
Reference in New Issue
Block a user