Closed x011 closed 1 year ago
Hi, The following python code works:
p = {
'http': 'proxy',
'https': 'proxy',
}
u = "https://www.tvtv.us/api/v1/lineup/USA-NY71652-DEFAULT/grid/2023-05-31T00:00:00.000Z/2023-06-01T00:00:00.000Z/10002"
r = requests.get(u, proxies=p)
print(r.status_code, r.text)
200
[[{"programId":"EP012521870004","title":"The Three Angels Message","subtitle":"How to Glorify God","flags":["CC","Stereo"]...
tvtv.us seems to block requests using hosting ip addresses, returning a 403 error. Residential proxies fixes the issue, but a new 301 error pops up.
Error: Request failed with status code 301
How can I debug this properly, namely, see the full response headers? Thank you.
301
error is related to cloudflare.
I "solved" this by creating a service on my server to act as a proxy and parse the tvtv.us json data.
Basically, I request an url like http://myserver/tvtv.us/date/date/ch_id
and receive the channel json data. This is far from ideal, but I couldn't manage to make it work directly with axios, even using custom headers and proxy.
Hope someone can fix this.
How do i go about fixing this on my end i don’t have python i’m new to this i have the install files from here
Hi, The following python code works:
p = { 'http': 'proxy', 'https': 'proxy', } u = "https://www.tvtv.us/api/v1/lineup/USA-NY71652-DEFAULT/grid/2023-05-31T00:00:00.000Z/2023-06-01T00:00:00.000Z/10002" r = requests.get(u, proxies=p) print(r.status_code, r.text) 200 [[{"programId":"EP012521870004","title":"The Three Angels Message","subtitle":"How to Glorify God","flags":["CC","Stereo"]...
tvtv.us seems to block requests using hosting ip addresses, returning a 403 error. Residential proxies fixes the issue, but a new 301 error pops up.
Error: Request failed with status code 301
How can I debug this properly, namely, see the full response headers? Thank you.
Any IP that is related, more or less, to a server or a high-entity is blocked by CF it seems.
I just tested it, and it's working fine at the moment.
npx epg-grabber --config=sites/tvtv.us/tvtv.us.config.js --channels=sites/tvtv.us/tvtv.us.channels.xml --output=guide.xml
Starting...
Loading 'sites/tvtv.us/tvtv.us.config.js'...
Loading 'sites/tvtv.us/tvtv.us.channels.xml'...
[1/4588] tvtv.us - 3ABNEnglish.us - Jun 19, 2023 (37 programs)
[2/4588] tvtv.us - 3ABNEnglish.us - Jun 20, 2023 (40 programs)
[3/4588] tvtv.us - 5StarMaxEast.us - Jun 20, 2023 (14 programs)
[4/4588] tvtv.us - AasthaBhajan.in - Jun 20, 2023 (34 programs)
...
Guide
tvtv.us.config.js
Description
Hi,
tvtv.us.config.js
is broken. Can it be fixed and is there any alternative for US channels? Thank you.