scrapy
莫•小七
这个作者很懒,什么都没留下…
展开
-
Scrapy-Redis从redis中取出item存到MySQL中
import json import redis import pymysql def main(): # 指定redis数据库信息 rediscli = redis.StrictRedis(host=‘10.0.126.13’, port=6379, db=0) # 指定mysql数据库 mysqlcli = pymysql.connect(host=‘47.94.252.144’, user=...原创 2018-10-30 11:55:09 · 1617 阅读 · 0 评论 -
全item存mysql存在就跳过 不插入
-- coding: utf-8 -- Define your item pipelines here Don’t forget to add your pipeline to the ITEM_PIPELINES setting See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import pymysql clas...原创 2018-10-30 11:59:09 · 476 阅读 · 0 评论