Advertisement
Guest User

For kek!

a guest
Aug 7th, 2017
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. # To use you need to:
  2. # 1. Save this code as a .py file
  3. # 2. Install some Python shit using CMD/ Terminal, do the following in CMD:
  4. # a. pip install beautifulsoup4
  5. # b. pip install requests
  6. # c. pip install html5lib
  7. # 3. Run the program.
  8.  
  9. from bs4 import BeautifulSoup
  10. from time import sleep
  11. import requests
  12.  
  13.  
  14. while True:
  15. try:
  16. s = requests.Session()
  17. page = s.get('http://lowd.com.au')
  18. data = page.text
  19.  
  20. soup = BeautifulSoup(data, "html5lib")
  21. buttons = soup.findAll('button')
  22. href = 'http://lowd.com.au' + buttons[1]['data-href']
  23.  
  24. page = s.post(href)
  25. print(page.status_code)
  26. sleep(.1)
  27. except:
  28. print("No connection, retrying.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement