from __futre__ import print_function
This commit is contained in:
parent
a9002374b1
commit
ec252440d9
14 changed files with 49 additions and 34 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
from __future__ import print_function
|
||||
import re
|
||||
from six.moves.urllib.parse import quote
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ def get_data(id):
|
|||
r['authors'] = []
|
||||
doc = lxml.html.document_fromstring(data)
|
||||
for e in doc.xpath("//span[contains(@class, 'author')]"):
|
||||
print e
|
||||
print(e)
|
||||
for secondary in e.xpath(".//span[contains(@class, 'a-color-secondary')]"):
|
||||
if 'Author' in secondary.text:
|
||||
author = e.xpath(".//span[contains(@class, 'a-size-medium')]")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue