Advertisement
Guest User

Untitled

a guest
Oct 15th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. import requests
  2. import os
  3. from multiprocessing.dummy import Pool as ThreadPool
  4.  
  5. def main():
  6. pool = ThreadPool(32) #number of simotanious downloads to run
  7. pool.map(download, range (9078,11108)) #set this for the email numbers of the new leak,
  8. #first number is included then all numbers up to but not including the second number.
  9.  
  10.  
  11. def download(url):
  12. #print command is not entirely trhead safe, but any bugs it has wont crash or cause any real probmels other than looking funny sometimes
  13. print(url)
  14. if (not os.path.exists(str(url)+ ".eml")):
  15. r = requests.get("https://wikileaks.org/podesta-emails//get/" + str(url))
  16. with open(str(url) + ".eml", "wb") as code:
  17. code.write(r.content)
  18.  
  19. if __name__ == "__main__":
  20. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement