Wikipedia-API
Wikipedia-API copied to clipboard
hebrew not supported with a passed api key
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
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.