You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today, iFixit API is reporting guide difficulty with a label which depends on the language selected (i.e. if you browse https://pt.ifixit.com/api/2.0/guides/... the guide difficulty will be in Portugues).
To accomodate with this fact, we have created a list of difficulty labels in constants.py
It would be preferable to retrieve automatically this list from a pre-made list of guides (and assume we will maintain only the english version to check that the guides difficulty has not been changed since last scraping).
The configuration in constants.py would then only hold a set of difficulties with following properties:
difficulty label in English
ID of a guide with this difficulty
CSS class to apply for this difficulty
The following process could be done at the scraper start:
retrieve all guides IDs stored in config for the various difficulties in all configured languages
check that the english version difficulty labels did not change, otherwise fail. Mention that this failure could be either because the guide difficulty has been updated - in which case we will have to find another guide with the appropriate difficulty - or because the label for this difficulty has been updated by iFixit - in which case we will have to update our configuration in constants.py
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
As of today, iFixit API is reporting guide difficulty with a label which depends on the language selected (i.e. if you browse https://pt.ifixit.com/api/2.0/guides/... the guide difficulty will be in Portugues).
To accomodate with this fact, we have created a list of difficulty labels in constants.py
ifixit/ifixit2zim/constants.py
Lines 41 to 112 in 4fe09d4
It would be preferable to retrieve automatically this list from a pre-made list of guides (and assume we will maintain only the english version to check that the guides difficulty has not been changed since last scraping).
The configuration in constants.py would then only hold a set of difficulties with following properties:
The following process could be done at the scraper start:
The text was updated successfully, but these errors were encountered: