View Single Post
Old 02-04-2016, 06:18 AM   #1
spart4n
Junior Member
spart4n began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2016
Device: paperwhite
Metadatada not working anymore for Amazon

Hi, it's 2-3 weeks that getting medata info from amazon gives me an error:

Code:
Request extra headers: [('User-agent', 'Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1')] 
Found 0 results 
Downloading from Amazon.com took 0.919376134872 
Failed to parse amazon page for query: u'http://www.amazon.com/s/?sort=relevanceexprank&field-title=LaTeX+Cookbook&search-alias=stripbooks&unfiltered=1'
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/ebooks/metadata/sources/amazon.py", line 1060, in identify
    namespaceHTMLElements=False)
  File "/usr/lib/python2.7/site-packages/html5lib/html5parser.py", line 29, in parse
    return p.parse(doc, encoding=encoding)
  File "/usr/lib/python2.7/site-packages/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/usr/lib/python2.7/site-packages/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/usr/lib/python2.7/site-packages/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/usr/lib/python2.7/site-packages/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/usr/lib/python2.7/site-packages/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/usr/lib/python2.7/site-packages/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/usr/lib/python2.7/site-packages/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'
I'm currently running version 2.50.1 from archlinux repositories.

Any help is very appreciated.

Cheers
spart4n is offline   Reply With Quote