I raise an import problem, when I setup a simple scraper :
Here is the content of my script :
from future import print_function
import itertools
from amazon_scraper import AmazonScraper
amzn = AmazonScraper("AKILSM4QQOKUVAX3lNPO", "s8a0hVmtfLL1TLZsKKiCBVvZTdQVG7x1HqhHZ1+E", "")
for p in itertools.islice(amzn.search(Keywords='python',
SearchIndex='Books'), 5):
print(p.title)
Here is the output given after the compilation:
root@nivose:~/amazon# python product.py
Traceback (most recent call last):
File "product.py", line 3, in <module>
from amazon_scraper import AmazonScraper
File "/usr/local/lib/python2.7/dist-packages/amazon_scraper/__init__.py", line 16, in <module>
from bs4 import BeautifulSoup
File "build/bdist.linux-x86_64/egg/bs4/__init__.py", line 30, in <module>
File "build/bdist.linux-x86_64/egg/bs4/builder/__init__.py", line 314, in <module>
File "build/bdist.linux-x86_64/egg/bs4/builder/_html5lib.py", line 70, in <module>
AttributeError: 'module' object has no attribute '_base
I raise an import problem, when I setup a simple scraper : Here is the content of my script :
Here is the output given after the compilation: