21 lines
508 B
Python
21 lines
508 B
Python
#!/usr/bin/env python3
|
|
|
|
import requests
|
|
import mwparserfromhell
|
|
import pypandoc
|
|
|
|
def main():
|
|
resp = requests.get("https://events.ccc.de/congress/2017/wiki/index.php?title=Assembly:CSOC&action=raw")
|
|
|
|
wikicode = mwparserfromhell.parse(resp.text)
|
|
properties = {str(param.name) : param.value for param in wikicode.filter_templates()[0].params}
|
|
|
|
|
|
print(properties)
|
|
|
|
output = pypandoc.convert_text(resp.text, 'html', format='mediawiki')
|
|
print(output)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|