Signed-off-by: kevin <kevin@dsm.lmve.net>

This commit is contained in:
kevin
2024-01-31 23:20:09 +08:00
parent ab81ca865c
commit 44df96ee2f
+4 -48
View File
@@ -12,7 +12,7 @@ import re
import jieba import jieba
import html import html
import json import json
from myfunsion import myfunsion
#from bs4 import BeautifulSoup as bs #from bs4 import BeautifulSoup as bs
#from lxml import etree #from lxml import etree
@@ -323,52 +323,8 @@ def getoneurl():
test=1
if test==0:
while 1:
theurl=getoneurl()
if theurl!='-1':
getandpost(theurl)
else :
print("获取url失败,自动重试")
if test==1:
theurl="https://lmve.net"
getandpost(theurl)
if test==2:
theurl=getoneurl()
print(theurl)
getandpost(theurl)
if test==3:
headers = {
'user-agent': 'my-app/0.0.1',
'Content-Type': 'text/html; charset=utf-8'
}
#print(begin_url)
#获取整个页面
url1="https://git.lmve.net/kevin/um-all-index-web/-/avatar"
url2="https://yyyyyyounger.com/"
try :
r = requests.get(url2,headers=headers,verify=False)
htmlx_byt=r.content
print(r.headers['Content-Type'])
except:
print("11")
if test==4:
#js=get_page_words("https://lmve.net")
#print(js)
myfunsion.a()
theurl="https://lmve.net"
redata=get_page_words(theurl)
print(redata['words'])