pip 安装超时问题
摘要:pip install -i https://pypi.doubanio.com/simple/ 包名 参考: https://blog.csdn.net/qq_39161804/article/details/81191977
阅读全文
posted @
2020-02-27 00:16
KD_131
阅读(152)
推荐(0)
scrapy全栈抓xpc练习
摘要:# spider文件 # -*- coding: utf-8 -*- import scrapy import re from scrapy import Request import json import string import random from xpc.items import Po
阅读全文
posted @
2020-02-13 17:20
KD_131
阅读(350)
推荐(1)
pyppeteer基本使用demo
摘要:# -*- coding: utf-8 -*- # 类似selenium,支持异步,不需要再单独安装环境,pyppeteer自动安装环境 # 异步await要写到一个函数的内部 from pyppeteer import launch import asyncio from lxml import
阅读全文
posted @
2020-02-07 15:40
KD_131
阅读(324)
推荐(0)
asyncio在爬虫中的使用
摘要:# -*- coding: utf-8 -*- # 协程基础.pyimport asyncio import time async def request(url): print("正在请求:", url) # r = await asyncio.sleep(3) time.sleep(3) pri
阅读全文
posted @
2020-02-06 17:59
KD_131
阅读(803)
推荐(0)
scrapy的扩展件extensions
摘要:extensions.py文件# -*- coding: utf-8 -*- # 该扩展会在以下事件时记录一条日志: # spider被打开 # spider被关闭 # 爬取了特定数量的条目(items) import logging from collections import defaultd
阅读全文
posted @
2020-02-01 12:00
KD_131
阅读(653)
推荐(0)