Open ghost opened 7 years ago
You can try to migrate to Wikipedia-API. It's very straightforward.
import wikipediaapi
wiki = wikipediaapi.Wikipedia('de')
p = wiki.page('Deutsche Sprache')
print(p.fullurl)
print(p.summary[0:60])
p_langs = p.langlinks
p_en = p_langs['en']
print(p_en.fullurl)
print(p_en.summary[0:60])
Outputs
https://de.wikipedia.org/wiki/Deutsche_Sprache
Die deutsche Sprache bzw. Deutsch [dɔʏ̯t͡ʃ], abgekürzt Dt. o
https://en.wikipedia.org/wiki/German_language
German (Deutsch [ˈdɔʏt͡ʃ] ( listen)) is a West Germanic lang
as in the title. I am able to fetch a page from Wikipedia, but it would be nice to get the name of the page to which current page refers to as "translations" in different languages. Is there a way to do it?