其他分享
首页 > 其他分享> > 利用爬虫去除acg视频软件广告

利用爬虫去除acg视频软件广告

作者:互联网

之前的发布的那个使用后发现id会变,重新弄了个爬虫能自动更新的

from lxml import etree
import win32com.client as wc
import requests

headers = {
    'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46",
}
url = 'https://www.axilesoft.com/app/player/lib/?hideadonce=acg&lang=cn'
responce = requests.get(url,headers = headers)
text = responce.text
html = etree.HTML(text)
acg = html.xpath('//*[@id="haButton"]/@onclick')
print(acg)
acgdata = acg[0].split("'")
data = acgdata[1]
wsh = wc.Dispatch("WScript.Shell")
wsh.Run(data)

标签:acg,text,爬虫,responce,headers,去除,90.0,import
来源: https://blog.csdn.net/qq_45608153/article/details/121126379