随笔分类 - 爬虫代码
摘要:import requests import json import my_fake_useragent import threading import pymysql #连接本地数据库 conn = pymysql.connect(host='',user='root',password='yan
阅读全文
摘要:依赖安装 pip install requests-html -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 如果安装失败,可能是Python解释器版本太高了,可以卸载掉,使用pycharm安装Python解释器 fr
阅读全文
摘要:import requests from lxml import etree from urllib import parse import re import json import threading from queue import Queue import hashlib class Sp
阅读全文
摘要:import requests from lxml import etree import csv import queue import threading from fake_useragent import UserAgent ua = UserAgent().random headers =
阅读全文