![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python爬虫学习
CTFer菜菜
接CTF密码方向培训/出题
展开
-
爬虫学习Day2
04.requests实战之肯德基餐厅位置爬取import requestsif __name__ == "__main__": url = 'http://www.kfc.com.cn/kfccda/ashx/GetStoreList.ashx?op=keyword' city = input("enter a city:") data = { 'cname':'', 'pid':'', 'keyword': city,原创 2020-12-11 15:55:37 · 186 阅读 · 0 评论 -
爬虫学习Day1
Requests模块环境安装:pip install requests实战编码:一需求:爬取搜狗首页的页面数据 # 一需求:爬取搜狗首页的页面数据import requestsif __name__ == "__main__": # step 1:指定url url = 'https://www.sogou.com/' # step 2:发起请求 # get()方法会返回一个响应对象 response = requests.get(url = .原创 2020-12-07 08:30:23 · 195 阅读 · 0 评论