Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product doesn't properly inherit the Part's image url #22

Open
tr4ce123 opened this issue May 31, 2024 · 1 comment
Open

Product doesn't properly inherit the Part's image url #22

tr4ce123 opened this issue May 31, 2024 · 1 comment

Comments

@tr4ce123
Copy link

from pypartpicker import Scraper
pcpp = Scraper()

cpus = pcpp.part_search("AMD Ryzen 7 5800X")

# Properly prints: https://cdna.pcpartpicker.com/static/forever/images/product/9b4cefb2e43f2c358f3a97a31e1be90b.256p.jpg
print(cpus[0].image)

# Turning the Part into a Product
product = pcpp.fetch_product(cpus[0].url)

# Prints None
print(product.image)

When i run this code, the first print statement returns the proper link, but the second one returns None and this has happened for every part/product combo I've tested. Not too big of an issue since you can at least get the image from the Part, but you might want to add this in your README as a note.

@thefakequake
Copy link
Owner

Hi, this seems to be a scraping bug as they have changed the format of the PCPP website since I last updated. I do not currently have time to fix this but I will get to this in the future. As you mentioned, this is low-priority as you can already fetch the image from the search function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants