PriceHero
PriceHero copied to clipboard
Get "None" when y try to get item price from amazon
import PriceHero as ph
laptop = ph.amazon("https://www.amazon.com/dp/B08FJ6ZB4V")
print(laptop)
{'name': 'GeIL Orion DDR4 RAM, 32GB (16GBx2) 3600MHz 1.35V XMP2.0, Intel/AMD Compatible, Long DIMM High Speed Desktop Memory, Hardcore Immersive Gaming/Multimedia Content Creation/Quality Live Streaming', 'price': None}
Hi @kohonez! Cam you give me the version of PriceHero that you are using. Do this:
import PriceHero as ph
print(ph.__version__)
Thanks!
Ok, the new version (0.5.2) should fix this bug. You can update PriceHero by running:
pip install --upgrade PriceHero-mehtaarn000
Let me know if you still have issues with this module.
ooops! i was trying with newegg by mistake.. still have issues with amazon :(..
import PriceHero as ph
print(ph.__version__)
laptop = ph.amazon("https://www.amazon.com/dp/B08FJ6ZB4V")
print(laptop)
OUTPUT: 0.5.2 {'name': 'GeIL Orion DDR4 RAM, 32GB (16GBx2) 3600MHz 1.35V XMP2.0, Intel/AMD Compatible, Long DIMM High Speed Desktop Memory, Hardcore Immersive Gaming/Multimedia Content Creation/Quality Live Streaming', 'price': None}
That's really strange. When I run the code:
import PriceHero as ph
print(ph.__version__)
laptop = ph.amazon("https://www.amazon.com/dp/B08FJ6ZB4V")
print(laptop)
I get:
0.5.2 {'name': 'GeIL Orion DDR4 RAM, 32GB (16GBx2) 3600MHz 1.35V XMP2.0, Intel/AMD Compatible, Long DIMM High Speed Desktop Memory, Hardcore Immersive Gaming/Multimedia Content Creation/Quality Live Streaming', 'price': '$185.99'}
It might have to do with your OS. Can you tell me what operating system you are using?
Win7 64 bits
let me try in a Linux box..
same in Ubuntu 18.04 LTS
After fixing this module and testing on a Windows 10 machine I got the expected output on both of my computers. Upgrade your version again and try. Let me know again if any errors occur!
Same, i'd tried in local Win7/Linux machines and a VPS with different ip, it's the same error.
Ok, I'm not really sure what's going wrong here. I'm going to try and tackle this tomorrow after getting some sleep. Thanks for notifying be about this issue though!
Is it possible you might have encountered some sort of scrape/automation blocking page from amazon?
I cannot replicate this problem on a Windows 10 64bit PC running Python 3.9.4
@kilianalias Meaning you get the expected output?
Yes, I get the expected output.