修复一些小问题
This commit is contained in:
@@ -74,6 +74,7 @@ def save_article(content):
|
||||
f.write('\n'.join([str(content.get('title')), str(content.get('autor')), str(content.get('article'))]))
|
||||
print('Downloaded article path is %s' % file_name)
|
||||
else:
|
||||
file_name = str(content.get('title')) + '.txt'
|
||||
print('Already Downloaded', file_name)
|
||||
except requests.ConnectionError:
|
||||
print('Failed to Save Image,item %s' % content)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import time
|
||||
from selenium import webdriver
|
||||
|
||||
# 强东的系统登陆模块没有用iframe,定位也没有微博那么复杂,可以靠id定位登陆
|
||||
login_url = 'https://passport.jd.com/new/login.aspx'
|
||||
driver = webdriver.PhantomJS()
|
||||
driver.get(login_url)
|
||||
|
||||
@@ -4,6 +4,7 @@ Required
|
||||
- requests
|
||||
- bs4
|
||||
'''
|
||||
import getpass
|
||||
import hashlib
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
@@ -71,6 +72,6 @@ class Leipin(object):
|
||||
|
||||
if __name__ == '__main__':
|
||||
userName = input("请输入你的用户名:")
|
||||
password = input("请输入你的密码:")
|
||||
password = getpass.getpass("password:")
|
||||
lp = Leipin(userName, password)
|
||||
print(lp.login())
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import getpass
|
||||
|
||||
import requests
|
||||
import hashlib
|
||||
import time
|
||||
|
||||
Reference in New Issue
Block a user