Giglium / vinted_scraper

A very simple Python package that scrapes the Vinted website to retrieve information about its items.
MIT License
17 stars 3 forks source link

Add a check on fetch cookie response status code #23

Closed Giglium closed 10 months ago

Giglium commented 10 months ago

What is the current behavior? And why it does suit you?

The _fetch_cookie raises only the error: Cannot fetch session cookie from {base_url}. But when the response has a status code different from 200, it's normal to receive an error because the _vinted_fr_session cookie is not returned. So a meaningful error will help all of us to debug.

Describe the solution you'd like

Add a more meaningful error like: Cannot fetch session cookie from {baseurl}, because of status code: {response.status_code} different from 200.

Other information

Improvement detected on #22