drandreaskrueger / drandreaskrueger/plutoalert

requests.get(url, proxies=proxies) to circumvent PlutoTv geoblocking

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

If [geoblocking](https://github.com/drandreaskrueger/plutoalert#geoblocking) results in an empty answer [], then retry the call but with proxies:

requests.get(url, proxies=proxies)

Instructions are [here](https://www.scrapingbee.com/blog/python-requests-proxy/) and [here](https://reqbin.com/code/python/bnnyomhw/python-requests-proxy-example).

I first wanted to get this working on the commandline, but couldn't yet:

curl -x http://107.173.222.196:49818 http://api.pluto.tv/v2/channels
curl -x http://107.173.222.196:49818 -L http://api.pluto.tv/v2/channels
curl: (7) Failed to connect to 107.173.222.196 port 49818: Connection timed out
curl: (56) Recv failure: Connection reset by peer

where I took the proxy IP and port from http://free-proxy.cz in one of the countries mentioned in the [geoblocking](https://github.com/drandreaskrueger/plutoalert#geoblocking) paragraph.

### good first issue

There are two levels to this "good first issue":

- simply: hardcode a couple of proxy server:port addresses in a proxylist.txt file that is read in when needed
- advanced: parse the http://free-proxy.cz page for an uptodate proxy in an unblocked country, here is an [example](https://stackoverflow.com/a/62984678)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.