01 2019 档案
摘要:使用分布式爬取,我的思路是这样的,一台机器爬取指定的url,存到缓存,爬url比解析总是要快吧,一页都有好几十的那种,就算每台机器的速度都一样,爬一次的url够几台机器同时去解析的了 接下来就是我们的解析了: 因为这个网站需要的数据是动态加载的,我js比较差,也不想去找函数,我就直接使用splash
阅读全文
摘要:# -*- coding: utf-8 -*- import redis from hashlib import md5 class SimpleHash(object): def __init__(self, cap, seed): self.cap = cap self.seed = seed def hash(self, value): ...
阅读全文
摘要:from concurrent.futures import ThreadPoolExecutor import time def sayh(pus): print("name: "+pus) time.sleep(2) def main(): put_list=["恩恩","嗯嗯","(⊙o⊙)嗯"] start1=time.time() for p...
阅读全文

浙公网安备 33010602011771号