tgorgdotcom / locast2plex

A very simple script to connect locast to Plex's live tv/dvr feature.
MIT License
234 stars 43 forks source link

Error in function login: Forbidden #272

Open tmwebb2 opened 3 years ago

tmwebb2 commented 3 years ago

I ma getting the error below. I allowed a Microsoft update and rebooted the laptop. Happens on my desktop and laptop.

C:\locast2plex>python3 main.py Initiating Locast2Plex v0.6.5 Opening and Verifying Configuration File. C:\locast2plex\config\config.ini C:\locast2plex\config.ini Loading Configuration File: C:\locast2plex\config.ini Tuner count set to 3 Server is set to run on 127.0.0.1:6077 UUID set to: zkqzpils... Getting user location... Getting location via IP Address. Got external IP 99.64.87.111. Got location as Atlanta - DMA 524 - Lat\Lon 34.0663-84.6784 Logging into Locast using username notmyreal@comcast.net... Error in function login: Forbidden Invalid Locast Login Credentials. Exiting...

ghost commented 3 years ago

I am still getting this error after upgrading:

Invalid Locast Login Credentials. Exiting...

Is anyone else?

SuperstationWTF commented 3 years ago

sillydino > Yes, I am getting the same error as you. It was working yesterday but not today. reinstalled, same error. Changes PW yesterday to alpha/numbers.

wouterdebie commented 3 years ago

It seems locast.org implemented the captcha, which breaks login.

ghost commented 3 years ago

It sounds like @cklinker 's suggestion is the only way locast2plex will be able to work consistently then?

mikedizzle commented 3 years ago

Is locast going to give dev access to all the people who are just running locast2plex on their various machines?

cc: @cklinker

cklinker commented 3 years ago

Modify the code to use this client_id 9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v+bsen4=

    loginReq = urllib.request.Request('https://api.locastnet.org/api/user/login?client_id=9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v%2Bbsen4%3D',
                                      ('{"username":"' + username + '","password":"' + password + '"}').encode("utf-8"),
                                      {'Content-Type': 'application/json', 'User-agent': self.DEFAULT_USER_AGENT})
mikedizzle commented 3 years ago

@cklinker That worked. Thanks! I did fill out the form to see if I can get my own client ID.

patrick-GH commented 3 years ago

@mikedizzle, let us know how that goes

tgorgdotcom commented 3 years ago

Hmmm I think I can request for an id and use it for all future versions. Let me see if I can get an id

wouterdebie commented 3 years ago

Modify the code to use this client_id 9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v+bsen4=

Would you mind sharing how you got that ID? I tried figuring out how the android app sent it, but had no luck sniffing traffic with a proxy. I didn't get lucky with trying to get it from decompiling some sources.

tgorgdotcom commented 3 years ago

Hello @wouterdebie, you can get a new client ID by registering on https://www.locast.org/developers/apply. I'm working on getting one myself. If it's all right with everyone, I'll use the one @cklinker made for now...

The downside to registering is the potential of having to remove location override features from our scripts/apps (per the dev agreement). I think Locast support has been pretty good dealing with users in the past when they ask them to fix geolocation issues, so the workaround may be to redirect users to Locast when the detected location is wrong.

tgorgdotcom commented 3 years ago

Hello all. 0.6.7 includes @cklinker's client ID temporarily. This is live on GitHub and in docker

craigarno commented 3 years ago

Hello all. 0.6.7 includes @cklinker's client ID temporarily. This is live on GitHub and in docker

Yeah, it wasn't clear if each instance of Locast2Plex had to have its own ClientID, or if the ClientID belonged to the Locast2Plex Application. So far I'm assuming the later and also updated my running instance to use @cklinker 's provided ClientID (Thank you). If this is wrong, I suspect we'll hear about it.

My thinking is it wouldn't make sense that every user would have to sign up as a developer to obtain a ClientID. It makes much more sense that a single ClientID would be for deployment of the Developer's Application, in this case, Locast2Plex.

cklinker commented 3 years ago

Modify the code to use this client_id 9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v+bsen4=

Would you mind sharing how you got that ID? I tried figuring out how the android app sent it, but had no luck sniffing traffic with a proxy. I didn't get lucky with trying to get it from decompiling some sources.

I created the Locast API. I have approved the requests for a client id as well and provided the client id I sent in this channel for all requests as well.

jwarner75 commented 3 years ago

Hello @wouterdebie, you can get a new client ID by registering on https://www.locast.org/developers/apply. I'm working on getting one myself. If it's all right with everyone, I'll use the one @cklinker made for now...

The downside to registering is the potential of having to remove location override features from our scripts/apps (per the dev agreement). I think Locast support has been pretty good dealing with users in the past when they ask them to fix geolocation issues, so the workaround may be to redirect users to Locast when the detected location is wrong.

I just applied for a Client ID, Any Idea how long it takes to get approved?

For now I'm using the one that a member created just to keep my Recordings going I have set. Once mine comes in I'll edit the file and add my personal one in.

mikesul76 commented 3 years ago

Many thanks to all who keep this working with the changes being made by Locast regarding login. Having a 'software based' DVR tuner that gives me whole house access and remote access (plex server is on 24/7 in my Locast location) is totally awesome! Who the heck wants to buy yet another piece of hardware for a DVR when we have this. THANK YOU!

Ned-Racine commented 3 years ago

Ditto to mikesul76! Much appreciations to all....

mikedizzle commented 3 years ago

Yes @mikesul76! This is awesome for those of us who don't have the chops to pull of emulating this function!

jwarner75 commented 3 years ago

I applied for a Client_ID so I'd have one myself. I finally got it day before yesterday i believe it was.

Not sure if I did it wrong or what, But when I changed the Information where it needed to be changed. I ended up with an error, it wouldn't work.

Any Idea why that might be?

jwarner75 commented 3 years ago

Modify the code to use this client_id 9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v+bsen4=

    loginReq = urllib.request.Request('https://api.locastnet.org/api/user/login?client_id=9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v%2Bbsen4%3D',
                                      ('{"username":"' + username + '","password":"' + password + '"}').encode("utf-8"),
                                      {'Content-Type': 'application/json', 'User-agent': self.DEFAULT_USER_AGENT})

@cklinker This is the very SAME Client_ID that was given to me when I signed up for one.

I tried this ID and my Script would NOT Run, kept getting failed log in attempts, so had to go back to the other one. Well the top one ending in +bsen4=. Not sure why it wasn't working.

cklinker commented 3 years ago

Modify the code to use this client_id 9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v+bsen4=

    loginReq = urllib.request.Request('https://api.locastnet.org/api/user/login?client_id=9qXBrVzpTjUZmVGsZRnnWQ-7GvGeJ48QWtV9v%2Bbsen4%3D',
                                      ('{"username":"' + username + '","password":"' + password + '"}').encode("utf-8"),
                                      {'Content-Type': 'application/json', 'User-agent': self.DEFAULT_USER_AGENT})

@cklinker This is the very SAME Client_ID that was given to me when I signed up for one.

I tried this ID and my Script would NOT Run, kept getting failed log in attempts, so had to go back to the other one. Well the top one ending in +bsen4=. Not sure why it wasn't working.

The actual client_id you were provided is not url Encoded to be sent in the request. When I approved all these requests for locast2plex I provided the same client id for all users.

jwarner75 commented 3 years ago

@cklinker Oh ok. I had to go back to using the one you provided in the code. I don't know anything about th eprogramming, I just follow the instructions and edit the files, copy and paste with Notepad++, at least that's what I use for my Raspberry Pi when editing some files.

mikesul76 commented 3 years ago

A 93-year old judge made a ruling in a New York court today... Honest to goodness, you have got to be kidding me, a 93-year old !!

He ruled "Error in function login: Forbidden" Very sad, very very sad.

Nbr1Sniper commented 3 years ago

Hopefully the ruling won’t effect those who already have access to Locast… It will however hurt expanding the service. They will need to apply for loans and hope they can get enough people to donate to pay it back in order to expand the service.

chriselgee commented 3 years ago

Well, looks like I'm not alone in getting this )-:

Error in function login: Forbidden
Invalid Locast Login Credentials. Exiting...
mikesul76 commented 3 years ago

@chriselgee Ensure you have the latest version (v0.6.7) for this to work.

chriselgee commented 3 years ago

Ah - that was it! Thanks @mikesul76 . (-: docker pull...

Nbr1Sniper commented 3 years ago

Guess it doesn’t matter. Locast has shutdown

jaimelalone commented 3 years ago

Guess it doesn’t matter. Locast has shutdown

Yeah, I just got that email as well. Was going to link to a press release but the site hadn't been updated yet.

Nbr1Sniper commented 3 years ago

I got one yesterday saying no more donation requests then this morning saying immediately suspending all services. Nothing works and their site says 0 markets. Ugh!!!!!!! I used locast as a backup to my Tablo as my antenna goes out during lightning storms.

ratherDashing commented 3 years ago

I got one yesterday saying no more donation requests then this morning saying immediately suspending all services. Nothing works and their site says 0 markets. Ugh!!!!!!! I used locast as a backup to my Tablo as my antenna goes out during lightning storms.

darn!

ghost commented 3 years ago

I wish they would explain a bit more here. Should we shut our donations down? Are they dead-dead now?

ratherDashing commented 3 years ago

I wish they would explain a bit more here. Should we shut our donations down? Are they dead-dead now?

i turned off my donations, they stopped providing their service, i stopped donating

Nbr1Sniper commented 3 years ago

I wish they would explain a bit more here. Should we shut our donations down? Are they dead-dead now?

i turned off my donations, they stopped providing their service, i stopped donating

Don’t blame you. I was about to start donating as I had just started using them. It’s all very confusing. Now looking at just getting another tuner that I can use with plex.

patrick-GH commented 3 years ago

I was gonna increase my donation amount, because it still would be 100% more cheaper than regular cable. I'm willing to bet no one would choose to donate now.

Maybe instead of interrupting the programming, they float something over the screen for a minute every 15 minutes.

On Thu, Sep 2, 2021, 11:21 AM Nbr1Sniper @.***> wrote:

I wish they would explain a bit more here. Should we shut our donations down? Are they dead-dead now?

i turned off my donations, they stopped providing their service, i stopped donating

Don’t blame you. I was about to start donating as I had just started using them. It’s all very confusing. Now looking at just getting another tuner that I can use with plex.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tgorgdotcom/locast2plex/issues/272#issuecomment-911943431, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMYEQUOS3O3OSUWO7FUSWTT766B7ANCNFSM5BRNQLPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Nbr1Sniper commented 3 years ago

More info here https://youtu.be/SI0lF3fJIXY

ghost commented 3 years ago

Curious, what are other people thinking of falling back to? I've used Playon to record off the internet, but this doesn't help with local stations....