
python 爬虫
小飞飞要变强
这个作者很懒,什么都没留下…
展开
-
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 3 column 13
遇到json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 3 column 13 (char 23)这个错误,这里把json对象转换为字典返回,用单引号会报错在这里插入图片描述 即要把里面的单引号转换为双引号 ...原创 2019-01-05 14:29:15 · 17826 阅读 · 0 评论 -
python requests网络爬取
# 1.京东商品页面的爬取 import requests url = 'https://item.jd.com/100003717483.html' try: r = requests.get(url) r.raise_for_status() r.encoding = r.apparent_encoding print(r.encoding) print...原创 2019-07-15 20:31:20 · 281 阅读 · 0 评论