
爬虫
QQの喵
这个作者很懒,什么都没留下…
展开
-
python MongoCache
class MongoCache(object): """ 数据库缓存 """ def __init__(self,client=None,expires=timedelta(days=30)): self.client = MongoClient("localhost",27017) self.db = self.client.ca...原创 2018-12-20 18:19:56 · 212 阅读 · 1 评论 -
爬虫第一天
爬虫步骤: 1. 导入requests import requests 2. url和请求头 url = 'http://example.webscraping.com/places/default/user/login' #要请求的页面地址 headers = {'User-Agent':'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Geck...原创 2018-12-17 21:30:27 · 163 阅读 · 1 评论