2019-05-23, 03:24
(2019-05-21, 19:54)Helioy Wrote: Anyone know what's happening in line 463+464. Workaround for cloudflare? I suggest to use something like https://github.com/VeNoMouS/cloudscraper...oudscraper instead.naww as a kodi plugin developer myself, feel the <3 Helioy
Quote: request = urllib2.Request("https://us-central1-kodi-thuongtin.cloudfunctions.net/subscene2", data , {'Content-Type': 'application/json', 'Content-Length': len(data)})
response = urllib2.urlopen(request)
I would do something simply as ...
import cloudscraper
scraper = cloudscraper.create_scraper()
response = scraper.get('https://us-central1-kodi-thuongtin.cloudfunctions.net/subscene2', json=data)
Assuming "data" is a dict...