Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERRPR CODE 403 #40

Open
Jag4343 opened this issue Dec 14, 2024 · 58 comments
Open

ERRPR CODE 403 #40

Jag4343 opened this issue Dec 14, 2024 · 58 comments

Comments

@Jag4343
Copy link

Jag4343 commented Dec 14, 2024

I have been getting ERROR Code 403 on every channel since yesterday. I just wanted to see if it will be fixed. Thanks

@dtankdempse
Copy link
Owner

dtankdempse commented Dec 14, 2024

I've disabled playlist requests due to someone flooding the server with around 100 requests every 1-2 seconds, in addition to the usual traffic.

"Due to excessive abuse of this playlist with the large amount of requests coming in per second, it is no longer possible to maintain it on a free tier service. If you wish to use TheTVApp playlist, you will need to host it in your own environment. I will prepare and package the necessary files, which will be listed here once ready."

I should have the files ready by tomorrow, along with a simple setup for running it locally, either through Docker or a compiled Node.js version for Windows users.

@Jag4343
Copy link
Author

Jag4343 commented Dec 14, 2024 via email

@dtankdempse
Copy link
Owner

dtankdempse commented Dec 14, 2024

It will run on a normal desktop computer with a simple one click setup file. After that, you just load the playlist into Tivimate using your computer's IP address.

@Jag4343
Copy link
Author

Jag4343 commented Dec 14, 2024 via email

@Jag4343
Copy link
Author

Jag4343 commented Dec 14, 2024 via email

@disableddabel
Copy link

Is it going to be paid and work on ipad

@dtankdempse
Copy link
Owner

@Jag4343
I tried to hold out as long as I could, but it’s getting hit way too hard now. There’s really no reason to request the playlist that many times since the tokens are being cached, but some people just won’t back off. I’ve been re-enabling the playlist periodically to see if things would calm down, but as soon as I turn it back on, I get around 200 playlist request within a few seconds.

@disableddabel
Nothing will need to be paid for. You’ll just need a computer or a free tier service to host the script.

@Aetherinox
Copy link

This is why we can't have nice things.

I think on my setup, I request a refresh TWICE per day, every 12 hours, and it works just fine.

@disableddabel
Copy link

disableddabel commented Dec 14, 2024 via email

@ChrisColotti
Copy link

ChrisColotti commented Dec 14, 2024

That's a bummer I know Channels DVR by default sets to once a day for refresh on everything.

What about building a docker image that anyone can install locally similar to this:
https://github.com/maddox/pluto-for-channels

Then people can just build the list themselves locally as you were but then you're not hosting it on a CF Worker.

Edit: @dtankdempse just saw in your original message you may do a docker image and/or supply the script and instructions....that would be ideal yes so everyone is just doing it themselves vs someone hosting which is more risk :)..I can just add it to my compose with the other container above.

@ChrisColotti
Copy link

I've disabled playlist requests due to someone flooding the server with around 100 requests every 1-2 seconds, in addition to the usual traffic.

"Due to excessive abuse of this playlist with the large amount of requests coming in per second, it is no longer possible to maintain it on a free tier service. If you wish to use TheTVApp playlist, you will need to host it in your own environment. I will prepare and package the necessary files, which will be listed here once ready."

I should have the files ready by tomorrow, along with a simple setup for running it locally, either through Docker or a compiled Node.js version for Windows users.

Sadly I have seen this on simple wordpress apps lately. I had to use the free WAF to block countries and other specific URL calls people were hammering. Different app but the hammering issue lately is real and for no reason at all.

@Jag4343
Copy link
Author

Jag4343 commented Dec 14, 2024 via email

@disableddabel
Copy link

disableddabel commented Dec 14, 2024 via email

@ChrisColotti
Copy link

@Jag4343 if you are not familiar with running your apps in Docker that is the easiest way. All my ARR infrastructure for plex and Channels DVR are all in Docker containers. Easiest way but takes some technical chops.

@disableddabel
Copy link

@ChrisColotti i need a m3u URL or a API line

@Jag4343
Copy link
Author

Jag4343 commented Dec 14, 2024 via email

@ChrisColotti
Copy link

ChrisColotti commented Dec 14, 2024

@ChrisColotti i need a m3u URL or a API line

Yes I know Channels DVR needs M3U urls as well but if you look at the example docker I linked to that generates the url locally that can then be downloaded by the player from the docker URL instead of someone else hosting it publicly .

https://github.com/maddox/pluto-for-channels

I host this locally right next to my player so the the URL is all local and works great. I’d love to do the same with the the playlist for the TV app

@disableddabel
Copy link

Can you send me it please

@ChrisColotti
Copy link

ChrisColotti commented Dec 14, 2024

@dtankdempse question

assume g you were running it all in a single CF worker can you also just post all the worker code so someone with their own CF account and access to workers can just reproduce your worker just for themselves to use (not publish to others).

May even be a quick way for folks like me with a CF account to create it back for my own use.

just a thought but that’s assuming you were running all the code in the worker. In theory that could just be a copy and paste into a new worker for one’s own self and on they go :)

I mean I could have 2-4 friends that I’d share the M3U and EPG too from my own worker but that depends. Just thinking if all the code is there and is just a copy/paste someone could get back pretty quick if they know how to add a new CF worker.

Just possibly another option for folks.

@damianmonelle
Copy link

sad news but just a idea you couldnt find a way to block the user manually and/or implement a way to suspend users that make to many request and rate limit them

@ChrisColotti
Copy link

sad news but just a idea you couldnt find a way to block the user manually and/or implement a way to suspend users that make to many request and rate limit them

I was thinking the same thing but I don’t think the CF WAF applies to workers. I was going to poke around my account since I’ve used the WAF to identify and block offending IPs on regular websites but not sure it applies to the CF workers.

@dtankdempse
Copy link
Owner

dtankdempse commented Dec 14, 2024

@ChrisColotti
I have all the code running through GitHub Actions on a private repo. The repo runs every half hour, creating around 60 tokens, and uses a Cloudflare Worker to pull those tokens and hand them out randomly when a playlist request comes in. Essentially, Cloudflare is only being used as a server to distribute the playlist with tokenized URLs.

I could potentially switch to something like a Google App Script and cache the tokens for around 30 minutes, which would help protect the daily limit of 20K fetches. I’ll see what I can do.

I don’t mind sharing the code, but Id prefer to do it over Discord or something similar. If someone else wants to take over the playlist requests, I’m fine with that. I stick to free tiers since this is just a hobby for me.

@damianmonelle
He’s actually using backconnect rotating proxies, so it’s tough to block him. Normally, I get around 8.5K to 9K requests a day, but since the abuse started, I’m seeing over 90K requests daily on my Cloudflare account.

@Jag4343 I will see what I can do about handling he playlist request using Google App Script instead. It's much easier to protect your free tier limit using them with caching.

I’ve finished the Dockerfile if anyone wants to test it out and provide feedback. The events haven’t been added yet because I still need to update the workflow.

docker Hub:

https://hub.docker.com/r/dtankdemp/thetvapp-m3u

@disableddabel
Copy link

disableddabel commented Dec 14, 2024 via email

@disableddabel
Copy link

Sent

@Aetherinox
Copy link

Aetherinox commented Dec 14, 2024

Also sent if you want to throw a 2nd copy. Also @dtankdempse, I saw you removed your discord, go into your Github message history and delete the post. Others could still see it.

29B8fph26O

@disableddabel
Copy link

disableddabel commented Dec 14, 2024 via email

@Aetherinox
Copy link

He didn't remove his discord name? Why am I seeing asterisks then.

@disableddabel
Copy link

disableddabel commented Dec 14, 2024 via email

@Jag4343
Copy link
Author

Jag4343 commented Dec 14, 2024 via email

@mrvenoz
Copy link

mrvenoz commented Dec 14, 2024

@ChrisColotti I have all the code running through GitHub Actions on a private repo. The repo runs every half hour, creating around 60 tokens, and uses a Cloudflare Worker to pull those tokens and hand them out randomly when a playlist request comes in. Essentially, Cloudflare is only being used as a server to distribute the playlist with tokenized URLs.

I could potentially switch to something like a Google App Script and cache the tokens for around 30 minutes, which would help protect the daily limit of 20K fetches. I’ll see what I can do.

I don’t mind sharing the code, but Id prefer to do it over Discord or something similar. If someone else wants to take over the playlist requests, I’m fine with that. I stick to free tiers since this is just a hobby for me.

@damianmonelle He’s actually using backconnect rotating proxies, so it’s tough to block him. Normally, I get around 8.5K to 9K requests a day, but since the abuse started, I’m seeing over 90K requests daily on my Cloudflare account.

@Jag4343 I will see what I can do about handling he playlist request using Google App Script instead. It's much easier to protect your free tier limit using them with caching.

I’ve finished the Dockerfile if anyone wants to test it out and provide feedback. The events haven’t been added yet because I still need to update the workflow.

docker Hub:

https://hub.docker.com/r/dtankdemp/thetvapp-m3u

It's really sad that people have to ruin it for others. I downloaded the playlist once a day maybe twice to my computer then played it on my vlc player. I hope you figure something out again man .. Good luck..

@ChrisColotti
Copy link

ChrisColotti commented Dec 14, 2024

@ChrisColotti I have all the code running through GitHub Actions on a private repo. The repo runs every half hour, creating around 60 tokens, and uses a Cloudflare Worker to pull those tokens and hand them out randomly when a playlist request comes in. Essentially, Cloudflare is only being used as a server to distribute the playlist with tokenized URLs.

I could potentially switch to something like a Google App Script and cache the tokens for around 30 minutes, which would help protect the daily limit of 20K fetches. I’ll see what I can do.

I don’t mind sharing the code, but Id prefer to do it over Discord or something similar. If someone else wants to take over the playlist requests, I’m fine with that. I stick to free tiers since this is just a hobby for me.

@damianmonelle He’s actually using backconnect rotating proxies, so it’s tough to block him. Normally, I get around 8.5K to 9K requests a day, but since the abuse started, I’m seeing over 90K requests daily on my Cloudflare account.

@Jag4343 I will see what I can do about handling he playlist request using Google App Script instead. It's much easier to protect your free tier limit using them with caching.

I’ve finished the Dockerfile if anyone wants to test it out and provide feedback. The events haven’t been added yet because I still need to update the workflow.

docker Hub:

https://hub.docker.com/r/dtankdemp/thetvapp-m3u

Got it on how you’re using CF. I’ll test the docker file though. I’m on free tiers as well.

Before I try docker does it create a local web server for the files? Any special environment commands needed, ports etc?

does it create both a local URL for both the
Playlist and EPG?

@Aetherinox
Copy link

Aetherinox commented Dec 14, 2024

It's really sad that people have to ruin it for others. I downloaded the playlist once a day maybe twice to my computer then played it on my vlc player. I hope you figure something out again man .. Good luck..

Yup. Always going to be someone out there who messes it up. Always. Especially for free things.

I don't work for Jellyfin, just a user. But if you haven't messed with Jellyfin yet for IPTV, I highly recommend trying it. I used to use VLC, just as a "lazy-man". But Jellyfin sets up a nice interface.

I tried Plex too, but I felt like Plex was too.... commercial? I guess that's the word. Plex pushes their own free live TV service, and it sort of clutters up the interface.

But some people also prefer Plex over Jellyfin, and they're both free, so you could try them both. Stupid simple to set up in docker.

@ChrisColotti
Copy link

It's really sad that people have to ruin it for others. I downloaded the playlist once a day maybe twice to my computer then played it on my vlc player. I hope you figure something out again man .. Good luck..

Yup. Always going to be someone out there who messes it up. Always. Especially for free things.

I don't work for Jellyfin, just a user. But if you haven't messed with Jellyfin yet for IPTV, I highly recommend trying it. I used to use VLC, just as a "lazy-man". But Jellyfin sets up a nice interface.

I tried Plex too, but I felt like Plex was too.... commercial? I guess that's the word. Plex pushes their own free live TV service, and it sort of clutters up the interface.

But some people also prefer Plex over Jellyfin, and they're both free, so you could try them both. Stupid simple to set up in docker.

Plex is or sure a PITA for live TV but Channels DVR works very well just for live TV and I use Plex with my ARR's for static files.

@ChrisColotti
Copy link

ChrisColotti commented Dec 14, 2024

@dtankdempse looks like the docker container is working for me piped into Channels DVR.

FYI for those that stand it up the port is 4124 for the web server that has the playlist URL and the EPG. I am showing 118 channels...I don't recall what it was before but seems about right.

@nclobo
Copy link

nclobo commented Dec 15, 2024

@dtankdempse looks like the docker container is working for me piped into Channels DVR.

FYI for those that stand it up the port is 4124 for the web server that has the playlist URL and the EPG. I am showing 118 channels...I don't recall what it was before but seems about right.

I get the same (118 channels) and all is working great. I think live events might be missing though.

@mrvenoz
Copy link

mrvenoz commented Dec 15, 2024

It's really sad that people have to ruin it for others. I downloaded the playlist once a day maybe twice to my computer then played it on my vlc player. I hope you figure something out again man .. Good luck..

Yup. Always going to be someone out there who messes it up. Always. Especially for free things.

I don't work for Jellyfin, just a user. But if you haven't messed with Jellyfin yet for IPTV, I highly recommend trying it. I used to use VLC, just as a "lazy-man". But Jellyfin sets up a nice interface.

I tried Plex too, but I felt like Plex was too.... commercial? I guess that's the word. Plex pushes their own free live TV service, and it sort of clutters up the interface.

But some people also prefer Plex over Jellyfin, and they're both free, so you could try them both. Stupid simple to set up in docker.

Thx for the info .. I may try it but I'm not sure if my old computer will run much "Roar LOL"!! I'm just watching plex_ca.m3u instead. Duck Dynasty channel baby.. I downloaded the m3u once a few weeks from ago from dtankdempse and they all still work!!

@ttgapers
Copy link

@dtankdempse - thanks for this awesome turnaround time!

@taylormia
Copy link

@dtankdempse Would you be able to provide a docker compose yml file for the m3u generating container? Thanks

@ttgapers
Copy link

ttgapers commented Dec 15, 2024

@dtankdempse Would you be able to provide a docker compose yml file for the m3u generating container? Thanks

Here is what I use in my stack:

thetvapp-m3u:
    image: dtankdemp/thetvapp-m3u:latest
    container_name: iptv-thetvapp-m3u
    ports:
      - 4124:4124 
    restart: unless-stopped
    networks:
      - default

@panman91
Copy link

@dtankdempse I have also installed the docker but unable to get LIVE Channels to import such as the NBA Channels which are normally imported via the bit.ly link. I am also only getting 118 channels in total when we used to receive over 180 per day.

@ChrisColotti
Copy link

@dtankdempse I have also installed the docker but unable to get LIVE Channels to import such as the NBA Channels which are normally imported via the bit.ly link. I am also only getting 118 channels in total when we used to receive over 180 per day.

Well at least the 118 is consistent for everyone so far so maybe the container image can be updated to adjust for the missing ones at this point which is still pretty fast progress IMO

@ChrisColotti
Copy link

ChrisColotti commented Dec 15, 2024

Here is my complete compose file that includes a couple other M3u generators. I just assign things to indidivual IP's vs using the host network..personal preference but not at all required.

version: "2.1"
services:
  plex-for-channels:
    image: ghcr.io/jgomez177/plex-for-channels
    container_name: plex-for-channels
    ports:
      - 80:7777
    networks:
      default:
        ipv4_address: 192.168.100.240
    restart: unless-stopped
  pluto-for-channels:
    image: jonmaddox/pluto-for-channels
    container_name: pluto-for-channels
    ports:
      - 80:80
    networks:
      default:
        ipv4_address: 192.168.100.241
    restart: unless-stopped
  the-tv-app:
    image: dtankdemp/thetvapp-m3u
    container_name: the-tv-app
    ports:
      - 4124:4124
    networks:
      default:
        ipv4_address: 192.168.100.242
    restart: unless-stopped

networks:
  default:
    external:
      name: qnet-static-bond0-076754

@dtankdempse
Copy link
Owner

The events are set up to start importing in the version of the Docker image I released yesterday. I just need to create another workflow to list the events in the file that’s already configured for importing. I should be able to finish everything today and will update the main Read Me section once it’s done.

@disableddabel
Copy link

disableddabel commented Dec 15, 2024 via email

@mitrakalloo
Copy link

mitrakalloo commented Dec 15, 2024

@dtankdempse getting this error on the playlist url Error: Subdomain or token is not available.

@ChrisColotti
Copy link

The events are set up to start importing in the version of the Docker image I released yesterday. I just need to create another workflow to list the events in the file that’s already configured for importing. I should be able to finish everything today and will update the main Read Me section once it’s done.

Great. @dtankdempse I assume we will need to pull the latest on the docker image to update once the new workflow is done?

@disableddabel
Copy link

disableddabel commented Dec 15, 2024 via email

@dtankdempse
Copy link
Owner

@mitrakalloo Yeah, I should have mentioned earlier that if you're outside the US, you'll need to use a VPN set to the US region. It seems TheTVApp has started blocking access from other regions. I'm using Mullvad VPN, which costs around £5 a month. Devices like Firestick, Android, etc., should still be able to access the streams without a VPN, though. Once I sort all of this out, I’m planning to try using Google Apps Script to generate and share a direct link to an M3U still.

@ChrisColotti I'm hoping I won’t need to make changes since I already have it set up to pull events from data/events.txt within this repo. However, with TheTVApp now blocking other regions, scraping has become more challenging. I was previously using TOR through Actions, but that’s now being blocked as well.

@taylormia
Copy link

@dtankdempse With the docker container, will there still be the rate limit of 5 playlist requests per IP address within a 2-hour window ? I'm assuming no, since the playlists are locally hosted. Are there any streaming rate limits on the tvapp end ?

@Aetherinox
Copy link

Aetherinox commented Dec 15, 2024

Fairly certain he had his own API limit in place because he was utilizing free resources to grab the data @taylormia and not exceed the limits.

But with or without a rate limit by TheTvApp, I would still be careful about how many streams you pull at a time / pings to the tvapp servers. Because the dev of TheTvApp more than likely has a way to track the bandwidth each IP is consuming, and if he starts to see high numbers coming from one IP, good chance he could / would block that IP from accessing his service.

I use Jellyfin, with two computers connected at a time to those channels, without issue. And I wouldn't go a lot higher than that. Because if you look at TheTvApp's paid plans, the top three packages have a limit of 2 connections. So I'd try to not exceed that, otherwise you'll draw attention.

Having 5 concurrent connections on one IP trying to stream is most definitely going to start drawing attention. Yes, this service is free for us, but the objective is to not abuse it, like someone did with @dtankdempse's API box. Otherwise it'll shut it down for everyone.

The fact that someone was making hundreds of API requests to dtankdempse a minute tells me they were purposely trying to do something. I just can't see how you hit that many attempts just setting it up and testing. Almost impossible. I was making two requests every 24 hours, and that was more than enough.

@csbazin
Copy link

csbazin commented Dec 15, 2024

@dtankdempse thanks for all you do. self-hosted Google App Script would be fabulous if possible, and very much appreciated. Cheers!

@taylormia
Copy link

@Aetherinox Not intending to exceed any limits. I access this and other m3u playlist and epg urls once every 4 hours for new content/changes. Have Kodi and NextPVR to use no more than two simutaneous streams. Appreciate @dtankdempse developing the docker image and sharing it.

@panman91
Copy link

Looks like dtankdempse just added events.txt to the git and when i reinstalled the latest container he has the live channels included now. I'm showing 143 channels as of right now.

@dtankdempse
Copy link
Owner

@taylormia No, since you're running the files locally, there are no rate limits imposed on my end. However, @Aetherinoxm is right to advise caution regarding how many streams you access from a single IP address. TheTVApp has implemented security measures to prevent server abuse. Based on what I've seen just from playlist requests, I can only imagine how significant the issue is on their side.

Alright, everyone, everything should be up and running for now, and I'm going to take a break. Throughout the week, I'll be looking into some other options to restore the direct link to the playlist.

@Aetherinox
Copy link

Aetherinox commented Dec 16, 2024

Alright, everyone, everything should be up and running for now, and I'm going to take a break. Throughout the week, I'll be looking into some other options to restore the direct link to the playlist.

Appreciate the work. I'm in the middle of fighting Github workflows right now, so I'll check it out in a bit. But thanks for getting this all going again.

Then I've got to go modify the tvapp docker image from yours. Then again, I'm wondering if it's even needed now, since your image puts a small web server up with links to the files. I'll debate it later.

Technically it still works, because I added env vars which allow the user to enter a custom URL for each of the files, so they could just input their own.

@taylormia
Copy link

@dtankdempse Just a suggestion. It may be helpful to add a sample docker compose yaml file to the docker section of the readme. It would be helpful to those of us that use apps like portainer etc. to manage containers. Here's the one I use based on the post from @ttgapers

version: '3'
services:
  thetvapp-m3u:
    image: dtankdemp/thetvapp-m3u:latest
    container_name: thetvapp-m3u
    ports:
        - 4124:4124 
    restart: unless-stopped

@disableddabel
Copy link

Let me know when it's done

@mrvenoz
Copy link

mrvenoz commented Dec 16, 2024

The events are set up to start importing in the version of the Docker image I released yesterday. I just need to create another workflow to list the events in the file that’s already configured for importing. I should be able to finish everything today and will update the main Read Me section once it’s done.

Wicked man ... Worked like a charm

@premiumcreativeuser
Copy link

premiumcreativeuser commented Dec 16, 2024

My Experience with Docker as a Beginner

As someone new to Docker with no prior development experience, I faced some frustration when trying to resolve an issue. While I eventually found my way, a step-by-step guide would have been immensely helpful. Below are the steps I followed and the challenges I encountered:

Created a Docker account, downloaded, and installed Docker Desktop.
Opened the terminal and ran the command:
docker pull dtankdemp/thetvapp-m3u:latest
Entered the following command to run the container:
docker run -d -p :4124 dtankdemp/thetvapp-m3u:latest
Encountered an error:
zsh: no such file or directory: port
Managed to run the container manually:
Opened the Images section in Docker Desktop.
Located dtankdemp/thetvapp-m3u and started it via the Actions button.
Checked the Containers tab and saw that the server was running on port 4124 under the Logs section.
Tried accessing the server by entering my local IP address into the browser using the template:
http://IP_ADDRESS:4124/playlist
However, I received a "Unable to connect" error.
Resolved the issue by revising my command:
Instead of "", I specified the actual port number:
docker run -d -p 4124:4124 dtankdemp/thetvapp-m3u:latest
After this correction, I was able to access the "Playlist Details" using my IP address.
Tested on VLC and I'm picking up 128 channels.

Final Thoughts:
For my use case, using an m3u playlist on a Firestick 4K turned out to be the simplest and most effective option.

@premiumcreativeuser
Copy link

Can anyone advise remote step by step setup instructions for Docker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests