将元数据的来源网站记入日志以便进行评估

This commit is contained in:
lededev
2021-10-18 10:51:32 +08:00
parent c9b96f65ab
commit 24b4f9f5e2
4 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
from os import replace
import requests
import hashlib
#import hashlib
from pathlib import Path
import secrets
import os.path
@@ -20,7 +20,7 @@ def getXpathSingle(htmlcode, xpath):
return result1
G_USER_AGENT = r'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36'
G_USER_AGENT = r'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36'
# 网页请求核心
def get_html(url, cookies: dict = None, ua: str = None, return_type: str = None):