Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. r = requests.get("https://footdistrict.com/", headers= _headers , proxies = proxies)
  2. except:
  3.  
  4. return None
  5. temp = r.text
  6. print (r.text)
  7. temp = temp.split(",S='")[1]
  8. temp = temp.split("'")[0]
  9. temp = str(base64.b64decode(temp).decode('utf-8')).replace("document.cookie", "return a").replace(
  10. "; location.reload()", "")
  11. token = execjs.compile("""
  12. function a(){
  13. """ + temp + """
  14. }
  15. """)
  16. cookie = token.call("a")
  17. cookie = {
  18. cookie.split("=")[0]: cookie.split("=")[1]
  19. }
  20.  
  21.  
  22. ERRORI
  23.  
  24.  
  25. Exception in thread Thread-2:
  26.  
  27.  
  28. Exception in thread Thread-12:
  29. Traceback (most recent call last):
  30. File "C:\Users\\AppData\Local\Programs\Python\Python37\lib\threading.py", line 917, in _bootstrap_inner
  31. self.run()
  32. File "C:\Users\\AppData\Local\Programs\Python\Python37\lib\threading.py", line 865, in run
  33. self._target(*self._args, **self._kwargs)
  34. File "c:/Users//Documents/monitor/footdistrict/main.py", line 141, in check_product
  35. r = make_request(link)
  36. File "c:/Users//Documents/monitor/footdistrict/main.py", line 111, in make_request
  37. utils = get_cookies()
  38. File "c:/Users//Documents/monitor/footdistrict/main.py", line 92, in get_cookies
  39. temp = temp.split(",S='")[1]
  40. IndexError: list index out of range
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement