Last active
October 10, 2025 07:49
-
-
Save RhinosF1/18c83dfbfadb84e28ee083628c029b41 to your computer and use it in GitHub Desktop.
This script will create a list of apis for all public miraheze.org wikis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| S = requests.Session() | |
| URL = "https://meta.miraheze.org/w/api.php" | |
| PARAMS = { | |
| "action": "wikidiscover", | |
| "format": "json", | |
| "wdstate": "public", | |
| "wdsiteprop": "url" | |
| } | |
| R = S.get(url=URL, params=PARAMS) | |
| DATA = R.json() | |
| data = DATA['wikidiscover'] | |
| ld = len(data) | |
| x = 0 | |
| while x < ld: | |
| wikidata = data[x] | |
| wikidata = wikidata['url'] | |
| print(str(wikidata) + '/w/api.php') | |
| x = x + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment