defan752

Untitled

Aug 25th, 2019
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. #import os
  2.  
  3. import requests
  4.  
  5. #This URL will be the URL that your login form points to with the "action" tag.
  6. POST = 'https://txapps.texas.gov/txapp/txdps/ltc/login.do'
  7.  
  8. #This URL is the page you actually want to pull down with requests.
  9. REQUEST = 'https://txapps.texas.gov/txapp/txdps/ltc/options.do'
  10.  
  11. # Set environment variables
  12. #os.environ['dlID'] = 'ID_HERE'
  13. #os.environ['dob'] = 'DOB_HERE'
  14.  
  15. payload = {
  16.     'dlID': 'ID_HERE',
  17.     'dob': 'DOB_HERE'
  18. }
  19.  
  20. with requests.Session() as session:
  21.     post = session.post(POST, data=payload)
  22.     r = session.get(REQUEST)
  23.     print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment