Here naverokê

Bikarhêner:Şêr/linkhere.py

Ji Wîkîferhengê
#!/usr/bin/python3

"""
    linkshere.py
    MediaWiki API Demos
    Demo of `Linkshere` module: Get a list of pages linking to a given page
    MIT License
   [[https://www.mediawiki.org/wiki/API:Linkshere]]
"""

import requests

S = requests.Session()

URL = "https://ku.wiktionary.org/w/api.php"

PARAMS = {
    "action": "query",
    "titles": "îro",
    "prop": "linkshere",
    "format": "json"
}

R = S.get(url=URL, params=PARAMS)
DATA = R.json()

print(DATA)