Merge remote-tracking branch 'douban/master'
This commit is contained in:
commit
ec45de3212
|
@ -169,7 +169,8 @@ class Douban(Metadata):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
html = etree.HTML(r.content.decode("utf8"))
|
decode_content = r.content.decode("utf8")
|
||||||
|
html = etree.HTML(decode_content)
|
||||||
|
|
||||||
match.title = html.xpath(self.TITTLE_XPATH)[0].text
|
match.title = html.xpath(self.TITTLE_XPATH)[0].text
|
||||||
match.cover = html.xpath(
|
match.cover = html.xpath(
|
||||||
|
@ -184,7 +185,7 @@ class Douban(Metadata):
|
||||||
if len(tag_elements):
|
if len(tag_elements):
|
||||||
match.tags = [tag_element.text for tag_element in tag_elements]
|
match.tags = [tag_element.text for tag_element in tag_elements]
|
||||||
else:
|
else:
|
||||||
match.tags = self._get_tags(html.text)
|
match.tags = self._get_tags(decode_content)
|
||||||
|
|
||||||
description_element = html.xpath(self.DESCRIPTION_XPATH)
|
description_element = html.xpath(self.DESCRIPTION_XPATH)
|
||||||
if len(description_element):
|
if len(description_element):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user