• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
fbhell
N久更新一次,备注学习资源
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  爬虫

爬虫
线程池

摘要:1 from multiprocessing.dummy import Pool 2 3 4 pool=Pool(4) 5 pool.map(函数,数组) 6 7 pool.close() 8 pool.join() 阅读全文
posted @ 2022-06-12 11:15 fbhell 阅读(18) 评论(0) 推荐(0)
协程+事件循环驱动+绑定回调

摘要:1 import asyncio 2 3 async def request(url): 4 print("请求url") 5 print("完成") 6 7 c=request("www.baidu.com") 8 loop=asyncio.get_event_loop() 9 #创建协程 10 阅读全文
posted @ 2022-06-12 11:15 fbhell 阅读(61) 评论(0) 推荐(0)
# 爬虫流程

摘要:# UA伪装 # 指定url # 发起请求,输入搜索内容 #获取数据 #持久化存储 https://curlconverter.com/#python 各个模块作用 requests 发送请求、获取数据、处理数据自动转码等 response=requests.get(url) response.te 阅读全文
posted @ 2022-06-12 11:14 fbhell 阅读(36) 评论(0) 推荐(0)
kfc店铺位置

摘要:1 import requests 2 list=[] 3 def ua(place="北京",pageIndex="1"): 4 cookies = { 5 'route-cell': 'ksa', 6 'ASP.NET_SessionId': 'unlvrjaq405kxftmopzeerp2' 阅读全文
posted @ 2022-06-12 11:13 fbhell 阅读(137) 评论(0) 推荐(0)
豆瓣爬取

摘要:import requests list=[] def ua(start=0): cookies = { 'll': '"118151"', 'bid': 'JGmehAcUHh0', '_pk_ref.100001.4cf6': '%5B%22%22%2C%22%22%2C1649677087%2 阅读全文
posted @ 2022-06-12 11:12 fbhell 阅读(63) 评论(0) 推荐(0)
UA伪装

摘要:# UA伪装 headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" ,"Conn 阅读全文
posted @ 2022-06-12 11:11 fbhell 阅读(247) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3