zmoog / refurbished

Python packace to access the products information available on the Apple Certified Refurbished section of the Apple Store.
MIT License
11 stars 3 forks source link

Fails for product family "ipads' on the 'fr' country store #65

Closed zmoog closed 2 years ago

zmoog commented 2 years ago

If I try to list the iPads on the "fr" store I get this error:

$ python cli/rfrb fr ipads

Traceback (most recent call last):
  File "/Users/zmoog/code/projects/zmoog/refurbished/cli/rfrb", line 65, in <module>
    get_products(auto_envvar_prefix='REFURBISHED')
  File "/Users/zmoog/code/projects/zmoog/refurbished/venv/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/zmoog/code/projects/zmoog/refurbished/venv/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/zmoog/code/projects/zmoog/refurbished/venv/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/zmoog/code/projects/zmoog/refurbished/venv/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/zmoog/code/projects/zmoog/refurbished/cli/rfrb", line 48, in get_products
    for p in search_products(
  File "/Users/zmoog/code/projects/zmoog/refurbished/refurbished/__init__.py", line 41, in get_ipads
    return self._get_products('ipad', **kwargs)
  File "/Users/zmoog/code/projects/zmoog/refurbished/refurbished/__init__.py", line 98, in _get_products
    products = parser.parse_products(product_family, resp.text)
  File "/Users/zmoog/code/projects/zmoog/refurbished/refurbished/parser.py", line 38, in parse_products
    products = product_section.ul.findAll("li")
AttributeError: 'NoneType' object has no attribute 'ul'