Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- sess = requests.Session()
- r = sess.get("http://idil24.space/login")
- print(r.text)
- soup = BeautifulSoup(r.content, "html.parser")
- if soup.find(id="One") and soup.find_all(class_="form-control col-2 mr-2"):
- c = soup.find(id='One_hidden')
- elif soup.find(id="Two") and soup.find_all(class_="form-control col-2 mr-3"):
- c = soup.find(id='Two_hidden')
- elif soup.find(id="Answer") and soup.find_all(class_="form-control col-2 mr-2"):
- c = soup.find(id='Answer_hidden')
- print(c['value'])
- r = sess.post("http://idil24.space/login", data={'One': c['value'],
- 'Two:': c['value'],
- 'Answer': c['value']})
- print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement