diff --git a/SpiderImg/StrongSpiderv2.0.py b/SpiderImg/StrongSpiderv2.0.py index 50721a9..929afec 100644 --- a/SpiderImg/StrongSpiderv2.0.py +++ b/SpiderImg/StrongSpiderv2.0.py @@ -1,23 +1,12 @@ # -*- coding: utf-8 -*- __author__ = 'Peng' -from bs4 import BeautifulSoup,Comment import urllib2 from urllib2 import urlopen,HTTPError -import MySQLdb -import json -import datetime import logging import sys -import re -import time -import random -import ConfigParser import threading -import threading -import Queue -import time from time import ctime,sleep -#获取infinity所有壁纸 +#获取infinity所有壁纸 适用于python2.7 # 配置日志信息 输出到控制台 logging.basicConfig(level=logging.INFO, @@ -40,9 +29,9 @@ def getInfinity(i): html = urlopen(request) data = html.read() imgName = str(i)+".jpg" - f = open("D:\\infinity\\"+imgName, 'wb') + f = open("C:\\infinity\\"+imgName, 'wb') f.write(data) - print u"正在保存的图片为",imgName + print ("正在保存的图片为",imgName) f.close() except HTTPError as e: print(e) diff --git a/requirements.txt b/requirements.txt index ca7535f..c35e0e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ lxml==3.8.0 numpy==1.13.3 olefile==0.44 parsel==1.2.0 -Pillow==6.2.0 +Pillow==7.1.0 pyasn1==0.2.3 pyasn1-modules==0.0.9 pycparser==2.17