Advertisement
tugapt

Untitled

Apr 25th, 2020
2,196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. import requests
  2.  
  3. d = {
  4.     "EmailAddress": "my@email.com",
  5.     "Password": "mypass",
  6.     "RememberMe":   True,
  7.     "SubscriberId": "",
  8.     "LicenseNumber":    "",
  9.     "CountryCode""SG"
  10. }
  11.  
  12. req = requests.Session()
  13.  
  14. login_u = "https://sso.mims.com/"
  15. login = req.post(login_u, data=d)
  16. print(login.cookies)
  17. print(login.text)
  18.  
  19. products_u = "https://mims.com/india/browse/alphabet/a?cat=drug&tab=brand"
  20. products = req.get(products_u, headers=h) # cookies from the previous request will be used automatically on this one due to Session()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement