import requests
from lxml import etree
url = 'https://www.aizhan.com/cha/baidu.com/'
headers = {
"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.200',
}
res = requests.get(url, headers=headers)
html = etree.HTML(res.text)
pcWords = html.xpath('//*[@id="cc1"]/text()')
wapWords = html.xpath('//*[@id="cc2"]/text()')
shoulu3_1days = html.xpath('//*[@id="shoulu3_1days"]/text()')
shoulu3_7days = html.xpath('//*[@id="shoulu3_7days"]/text()')
shoulu3_30days = html.xpath('//*[@id="shoulu3_30days"]/text()')
print('PC词数:' + pcWords[0])
print('wap词数:' + wapWords[0])
print('24词数:' + shoulu3_1days[0])
print('7天词数:' + shoulu3_7days[0])
print('30天词数:' + shoulu3_30days[0])
大佬,请教一下如果换成网址:https://seo.chinaz.com/,站长工具该怎么写法