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