![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
一块未知的巧克力
探索,走不寻常路
展开
-
Python crawler: TypeError: list indices must be integers or slices, not str
目标:获取class中的src: #[] import requests from bs4 import BeautifulSoup url2 = 'https://book.douban.com/tag/%E5%B0%8F%E8%AF%B4?start=20&type=T' headers = { 'Cookie': 'bid=PZvLUOLGEXA; gr_user_id=058ae679-f073-4439-8fee-e150845fc5d1; gr_session_id_22c93原创 2021-12-28 20:17:57 · 469 阅读 · 0 评论 -
UnicodeEncodeError: ‘latin-1‘ codec can‘t encode character ‘\u2026‘ 爬虫Spider 报错cookie内容
在Cookie很多内容那行,加个模块解决: from urllib.parse import quote原创 2021-06-02 19:09:06 · 233 阅读 · 0 评论