Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions SpiderImg/StrongSpiderv2.0.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down