added support for different languages

This commit is contained in:
Daniel Knüttel 2019-02-19 14:15:28 +01:00
parent 21c3d3aa64
commit a933d441ce

View File

@ -1,3 +1,3 @@
def construct_url(title): def construct_url(title, lang="en"):
return "https://en.wikipedia.org/w/api.php?action=query&prop=links&pllimit=500&titles={}&format=json".format(title) return "https://{}.wikipedia.org/w/api.php?action=query&prop=links&pllimit=500&titles={}&format=json".format(lang, title)