Skip to content

Commit f478460

Browse files
committed
Add log in zh-cn.py for showing progress
1 parent d762acd commit f478460

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

zh-cn.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def get_image(isbn, image_filename):
1515
:type en_isbn: str
1616
:rtype: str
1717
"""
18+
print("get_image(" + isbn + "," + isbn + ")")
1819
response = urllib2.urlopen(book_url)
1920
html = response.read()
2021
re_image_url = r"https://img\d\.doubanio\.com/lpic/s\d*\.jpg"
@@ -25,6 +26,7 @@ def get_image(isbn, image_filename):
2526
ft.write(image)
2627

2728
def get_book_url_year(isbn):
29+
print("get_book_url_year(" + isbn + ")")
2830
url = "https://api.douban.com/v2/book/isbn/" + isbn
2931
result = "https://book.douban.com/", ""
3032
try:
@@ -37,6 +39,7 @@ def get_book_url_year(isbn):
3739
return result
3840

3941
def get_book_info(book_index):
42+
print("get_book_info(" + book_index + ")")
4043
title = "未找到中文"
4144
zh_isbn = ""
4245
with open("isbn.csv") as ff:

0 commit comments

Comments
 (0)