Skip to content

Commit

Permalink
处理副标题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomengzi06 committed Feb 17, 2022
1 parent de0e074 commit ce44969
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def parse_book(self, url, book_content):
book['authors'].extend([self.get_text(author_element) for author_element in element.findall("..//a")])
elif text.startswith("出版社"):
book['publisher'] = self.get_tail(element)
elif text.startswith("副标题"):
book['title'] = book['title'] + ':' + self.get_tail(element)
elif text.startswith("出版年"):
book['publishedDate'] = self.get_tail(element)
elif text.startswith("ISBN"):
Expand Down

0 comments on commit ce44969

Please sign in to comment.