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
I recently noticed an error throwing from quote_of_the_day() function with 'param lang=fr'.
I also watched french webpage for wikiquote and it havent the ID "mf-qotd" in it. I am not totally sure what could be the best fix regarding the code : better for an exception or is there a more generic id or xpath formula to catch it ?
Based on supported language I have also noted that error for : fr, eu, pl, pt
Tell me if you need more details but I guess it is easily reproductible
thanks for your work I love wikiquote on some of my shells :)
$ wikiquote.quote_of_the_day(lang="fr")
MissingQOTDException: Unable to retrieve quote of the day. This is probably due to a recent change in Wikiquote's main page page layout. Please try again later. If the problem persists, open an issue at: https://github.com/federicotdn/wikiquote
``
The text was updated successfully, but these errors were encountered:
ikario404
changed the title
quote_of_the_day errors with some language : best way to fix ?
quote_of_the_day errors with some languages : best way to fix ?
Feb 23, 2024
Hi! yes good observation, this has been the largest pain point in developing this library. Honestly the best idea I've had till now was to try multiple extraction methods until one works, for example for French I try two in a row: https://github.com/federicotdn/wikiquote/blob/main/wikiquote/langs/fr.py
However even this does not always work, because the Wikiquote page layouts vary sometimes in subtle ways that break the scripts. I am definitely open to new ideas that might help to fix this !
Hi
I recently noticed an error throwing from quote_of_the_day() function with 'param lang=fr'.
I also watched french webpage for wikiquote and it havent the ID "mf-qotd" in it. I am not totally sure what could be the best fix regarding the code : better for an exception or is there a more generic id or xpath formula to catch it ?
Based on supported language I have also noted that error for : fr, eu, pl, pt
Tell me if you need more details but I guess it is easily reproductible
thanks for your work I love wikiquote on some of my shells :)
The text was updated successfully, but these errors were encountered: