Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4.  
  5. sess = requests.Session()
  6. r = sess.get("http://idil24.space/login")
  7. print(r.text)
  8.  
  9. soup = BeautifulSoup(r.content, "html.parser")
  10.  
  11. if soup.find(id="One") and soup.find_all(class_="form-control col-2 mr-2"):
  12.     c = soup.find(id='One_hidden')
  13. elif soup.find(id="Two") and soup.find_all(class_="form-control col-2 mr-3"):
  14.     c = soup.find(id='Two_hidden')
  15. elif soup.find(id="Answer") and soup.find_all(class_="form-control col-2 mr-2"):
  16.     c = soup.find(id='Answer_hidden')
  17. print(c['value'])
  18.  
  19.  
  20. r = sess.post("http://idil24.space/login", data={'One': c['value'],
  21.                                                  'Two:': c['value'],
  22.                                                  'Answer': c['value']})
  23.  
  24. print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement