martin-majlis / Wikipedia-API

Python wrapper for Wikipedia
MIT License
583 stars 75 forks source link

hebrew not supported with a passed api key #75

Closed nevakrien closed 4 weeks ago

nevakrien commented 8 months ago

wiki_he = wikipediaapi.Wikipedia(language='he',user_agent=user_agent, headers={"Authorization": f"Bearer {secrets2['Access token']}"}) wiki_he.page("אמנות").text

this works for the English equivalent of the page with english as lang

irisdominguez commented 3 months ago

Hi! I got the same problem and fortunately I found a fix!

Despite the documentation in the wikimedia API, they expect {"Authorization": f"{secrets2['Access token']}"}) directly. Note that "Bearer" is not there.

Removing that I got mine working.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 4 weeks ago

This issue was closed because it has been stalled for 10 days with no activity.