Skip to content

Commit

Permalink
Add log in zh-cn.py for showing progress
Browse files Browse the repository at this point in the history
  • Loading branch information
miloyip committed Dec 20, 2016
1 parent d762acd commit f478460
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zh-cn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def get_image(isbn, image_filename):
:type en_isbn: str
:rtype: str
"""
print("get_image(" + isbn + "," + isbn + ")")
response = urllib2.urlopen(book_url)
html = response.read()
re_image_url = r"https://img\d\.doubanio\.com/lpic/s\d*\.jpg"
Expand All @@ -25,6 +26,7 @@ def get_image(isbn, image_filename):
ft.write(image)

def get_book_url_year(isbn):
print("get_book_url_year(" + isbn + ")")
url = "https://api.douban.com/v2/book/isbn/" + isbn
result = "https://book.douban.com/", ""
try:
Expand All @@ -37,6 +39,7 @@ def get_book_url_year(isbn):
return result

def get_book_info(book_index):
print("get_book_info(" + book_index + ")")
title = "未找到中文"
zh_isbn = ""
with open("isbn.csv") as ff:
Expand Down

0 comments on commit f478460

Please sign in to comment.