Advertisement
Urbanecm

Untitled

Dec 6th, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. import requests
  4. base_url = 'https://wiki.wikimedia.cz'
  5. script_path = '/mw/'
  6. article_path = '/wiki/'
  7. api_url = base_url + script_path + 'api.php'
  8.  
  9. r = requests.get(api_url, params={
  10. 'action': 'query',
  11. 'meta': 'tokens',
  12. 'type': 'csrf',
  13. 'format': 'json',
  14. })
  15. print r.content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement