一直以来,对选用一个合适的微信头像,感到比较头疼。今天为大家推荐1000多张,非常惊艳的能用做微信头像的图片,都已按照类别分好类,文末提供下载方法,相信大家一定能从中找到一款自己喜欢的。1 requests失败使用requests请求微信表情图片网址https://www.zhihu.com/question/335825565, 同时使用web网页提取包:lxml,提取想要的所有图片链接地址,也就是下面的代码:import requestsfrom lxml import etreeimport pandas as pdimport reurl = 'https://www.zhihu.com/question/335825565'with requests.get(url) as res: content = res.content print(content) html = etree.HTML(content) imgs = html.xpath('//figure//img/@src') print(imgs)这样直接运行,content的打印显示如下,并没有请求到想要的结果。b'\r\n400 Bad Request\r\n\r\n400 Bad Request\r\no
………………………………