Skip to content

Commit

Permalink
add some results got by the spider
Browse files Browse the repository at this point in the history
  • Loading branch information
lanbing510 committed May 20, 2015
1 parent 5f4ad35 commit dd64ed6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DouBanSpider.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def book_spider(book_tag):
if list_soup==None and try_times<200:
continue
elif list_soup==None or len(list_soup)<=1:
break # Break when no valid informatoin got after 200 times requesting
break # Break when no informatoin got after 200 times requesting

for book_info in list_soup.findAll('dd'):
title = book_info.find('a', {'class':'title'}).string.strip()
Expand Down Expand Up @@ -105,7 +105,7 @@ def print_book_lists_excel(book_lists,book_tag_lists):


if __name__=='__main__':
book_tag_lists = ['心理','判断与决策','算法','数据结构','历史','经济']
book_tag_lists = ['心理','判断与决策','算法','数据结构','经济','历史']

book_lists=do_spider(book_tag_lists)
print_book_lists_excel(book_lists,book_tag_lists)
Expand Down
Binary file added book_list.xlsx
Binary file not shown.
Binary file added screenshots/douban.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd64ed6

Please sign in to comment.