Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import requests
  2. import time
  3. import os
  4. import random
  5.  
  6. url = 'https://2ch.hk/makaba/posting.fcgi'
  7. data = {
  8. 'task': 'post',
  9. 'board': 'asylum',
  10. 'thread': '491738',
  11. 'email': '',
  12. 'name': '',
  13. 'subject': '',
  14. 'comment': 'test pikchi',
  15. }
  16. pack = 'D:/pics/'
  17.  
  18. for i in range(3):
  19.     filename = random.choice(os.listdir(pack))
  20.     filepath = os.path.join(pack, filename)
  21.     files = {'image1': open(filepath, 'rb').read()}
  22.     requests.post(url, params=data,  files=files)
  23.     time.sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement