Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4. url = 'https://lovecleanstreets.com'
  5.  
  6.  
  7. s = requests.Session()
  8. reportsfront = s.get(url)
  9.  
  10. CategoryId = -1
  11. Completed = ''
  12. ReportedStartDate = '10/03/2018'
  13. Tag = ''
  14. Take = 5
  15. WardId = ''
  16. XRequestedWith = 'XMLHttpRequest'
  17.  
  18. payload = {'CategoryId' : CategoryId,
  19. 'Completed' : '',
  20. 'ReportedStartDate' : ReportedStartDate,
  21. 'Tag' : Tag,
  22. 'Take' : Take,
  23. 'WardId' : WardId,
  24. 'X-RequestedWith' : XRequestedWith}
  25.  
  26. datedreports = s.post(url, data = payload)
  27.  
  28. bs4_datedreports = BeautifulSoup(datedreports.text, 'html.parser')
  29.  
  30. print (bs4_datedreports.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement