thefakequake / pypartpicker

A Python package that can be used to fetch information from PCPartPicker on products and parts lists.
MIT License
18 stars 8 forks source link

key error on fetch_product #18

Closed uprod closed 7 months ago

uprod commented 7 months ago

Hi,

i have a key error on fetch_product

Traceback (most recent call last):
  File "/Users/admin/projects/pypartpicker/test.py", line 20, in <module>
    product = pcpp.fetch_product(first_product_url)
  File "/Users/admin/opt/anaconda3/lib/python3.9/site-packages/pypartpicker/scraper.py", line 409, in fetch_product
    + review.find(class_="userDetails__userName")["href"],
  File "/Users/admin/opt/anaconda3/lib/python3.9/site-packages/bs4/element.py", line 1519, in __getitem__
    return self.attrs[key]
KeyError: 'href'
thefakequake commented 7 months ago

Looks like the PCPP HTML structure has changed slightly, I will push out an update soon to fix this.

thefakequake commented 7 months ago

Should be fixed now.