摘要:
import requests from lxml import etree url_domain="https://www.dytt8.net" headers={ "User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537 阅读全文
摘要:
错误代码: zoomE=html.xpath("//div[@id='Zoom']") cover=zoomE.xpath("//img/@src") print(cover) zoomE是一个列表 正确代码: zoomE=html.xpath("//div[@id='Zoom']")[0] cov 阅读全文
摘要:
原代码: text =response.content.decode('gbk') 错误提示: text =response.content.decode('gbk')UnicodeDecodeError: 'gbk' codec can't decode byte 0xd0 in position 阅读全文
摘要:
import requests from lxml import etree url="https://www.piaohua.com/" headers={ "User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 阅读全文