Skip to main content

刮刀

项目描述

1)算法 - 删除
所有内联帖子

2)
bin/scraper_worker

3) 从 imagehash 转到 3 文件夹

从 iso8601 导入
dhash
从 PIL 导入 parse_date 导入 Image as PIL_Image

cur_im1 = PIL_Image.open('/home/t/Desktop/videos/3 /test.jpg')
cur_hash1 = str(dhash(cur_im1))

GO TO REDIS select 1
set 2f2b0b2b33232323 "380668111208"


4)
import os
import redis
path = '/home/t/Desktop/videos/images'
two_dir = os.listdir (路径)
r = redis.StrictRedis(host="localhost", port=6379, charset="utf-8", decode_responses=True, db=0)
keys = r.keys('*')
redis_values_dict = dict()
对于键中的键:
redis_values_dict[r.get(key)] = None
count = 0
for image in two_dir:
if image not in redis_values_dict:
os.remove('{}{}{}'.format(path, '/', image ))
计数+= 1


0.0
---

- 初始版本

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

xxx.scraper-0.94.tar.gz (7.1 kB 查看哈希

已上传 source