Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To use you need to:
- # 1. Save this code as a .py file
- # 2. Install some Python shit using CMD/ Terminal, do the following in CMD:
- # a. pip install beautifulsoup4
- # b. pip install requests
- # c. pip install html5lib
- # 3. Run the program.
- from bs4 import BeautifulSoup
- from time import sleep
- import requests
- while True:
- try:
- s = requests.Session()
- page = s.get('http://lowd.com.au')
- data = page.text
- soup = BeautifulSoup(data, "html5lib")
- buttons = soup.findAll('button')
- href = 'http://lowd.com.au' + buttons[1]['data-href']
- page = s.post(href)
- print(page.status_code)
- sleep(.1)
- except:
- print("No connection, retrying.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement