Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import requests,sys
  2. import codecs
  3. search_word=sys.argv[1]
  4. api_url="https://en.wikipedia.org/w/api.php"
  5. api_params={"format":"xmlfm","action":"query","prop":"revisions","rvprop":"content"}
  6. api_params["titles"]=search_word
  7. wiki_data=requests.get(api_url, params=api_params)
  8. fo=codecs.open("C:\\Users\\user\\Downloads\\TOOL\\PATRICK\\"+search_word+".html","w","utf-8")
  9. fo.write(wiki_data.text)
  10. fo.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement