Jump to content

Locast Integration issue


mark-in-dallas

Recommended Posts

mark-in-dallas

Just wanting to give a heads up to anyone else whose Locast integration stopped working in the last day or so, and are now getting "No compatible streams are currently available" errors when trying to play a Locast channel and Rate Limit errors when trying to login to locast.org.

I had this issue crop up today and nothing I tried fixed the issue.  I then googled to see if anyone else was experiencing issues and found an "Error in Function login" thread where many people were experiencing a very similar issue to mine, and a fix that many people are saying worked for them  I am trying the fix now, but have to wait out the Rate Limit to timeout to see if it works.  If so I will post the code correction, but if anyone else is having the issue and wants to follow the thread, here's the link:  https://github.com/tgorgdotcom/locast2plex/issues/272

Edited by mark-in-dallas
  • Thanks 1
Link to comment
Share on other sites

mark-in-dallas

And the code edit did work!  Here's how to get your locast integration working again:

Find this code in your LocastService.py file at around line 68:

loginReq = urllib.request.Request('https://api.locastnet.org/api/user/login',
                                          ('{"username":"' + username + '","password":"' + password + '"}').encode("utf-8"),
                                          {'Content-Type': 'application/json', 'User-agent': 'Mozilla/5.0'})

Replace with this code:

loginReq = urllib.request.Request('https://api.locastnet.org/api/user/login?client_id=CqhAMsBw%2BnxTXSJMLGqyOw%3D%3D', ('{"username":"' + username + '","password":"' + password + '", "captcha": "anything"}').encode("utf-8"), {'Content-Type': 'application/json', 'User-agent': 'Mozilla/5.0'})

Open a terminal from that directory and type:  python3 main.py, or just reboot your computer and your Locast service should be working again.

The api client id is hard coded and could change at some point in the future, but at least for now this does work.

Edited by mark-in-dallas
  • Like 1
Link to comment
Share on other sites

mark-in-dallas

Another heads up.  The fix I posted yesterday only worked for about a half of a day before it stopped working and generating the login errors again

But as is all to common around here,  Cayars saved the day by finding another script written by an Emby forum member that is working now and its even easier to install and setup than the locast2plex script.  You can find it here:  https://github.com/wouterdebie/locast2tuner

Edited by mark-in-dallas
  • Like 2
Link to comment
Share on other sites

BillOatman

Thanks for the heads up.  I have an app that works with Locast.  Based on what I see in that locast2tuner source I suspect it is broken now.  Also, if they are implementing a captcha front door, everything will likely stop working as soon as it is fully implemented.

Edited by BillOatman
Link to comment
Share on other sites

I think this was written by @wouterdebie if I'm not mistaken who should get the credit for this.

I'd love to see the readme give example setup for Windows along with Linux/Mac as well if possible for those with an aversion to running docker.

 

  • Like 1
Link to comment
Share on other sites

mark-in-dallas

And another heads up:  the @wouterdebie script appears to have stopped working now too.

Edited by mark-in-dallas
Link to comment
Share on other sites

Bummer.

These types of scripts are likely going to need to include captcha busting libs or will need some kind of human interaction to answer the captcha and get a new ID.

I don't have this active at the moment so can't check it but I know Channels DVR has Locast built in.  It's possibly they have found a solution, so this might be worth checking.  It's not free but only a few bucks a month and they have a 30 day free trial so might be worth checking.

It's quite easy to feed Channels DVR streams and guide data into Emby if it works.

Link to comment
Share on other sites

emveepee

In the Extra script I use for NextPVR based originally on locast2plex the recaptha change is still working.   I do think it is matter or time though.

Martin

Edited by emveepee
  • Thanks 1
Link to comment
Share on other sites

Dan_Austin

I found that tuning a Locast channel twice will get the streams to load, but then I have an tuner that cannot be released.  This is with the latest server beta, and tuned from the web interface.  Killing the tuner at the proxy service does not work and Emby restarts it, but there is no active tuner according the the Emby active client list.  It takes restarting the tuner proxy or emby to release.  Will report in the beta forums that behaviour.

This is without editing the proxy to add the client_id.

Edited by Dan_Austin
Link to comment
Share on other sites

BillOatman
On 8/7/2021 at 9:47 AM, emveepee said:

In the Extra script I use for NextPVR based originally on locast2plex the recaptha change is still working.   I do think it is matter or time though.

Martin

Is that script available?

Never mind, found it :)

Interesting that it still works.  It's doing the same thing the @wouterdebie script is.

Edited by BillOatman
Link to comment
Share on other sites

BillOatman

This was posted by the Locast Extra script author on 8/5.

Quote

Yes it looks like they have changed the login to use a recaptha key system of some kind, I will need to see what other locast apps are doing.
Edit: I found a solution found via locast2tuner change yesterday. Thanks to author. Hopefully this will work for a while.

So everyone is pretty much doing the same thing now :)

But like @cayarssaid above, at some point it's likely a captcha buster (pricey from my investigation), or human interaction to solve the catcha will be required.

Edited by BillOatman
  • Like 1
Link to comment
Share on other sites

mark-in-dallas

I ended up removing all traces of the locast scripts I'd used, then installing the updated locast2plex, and I'm up and running again.  For how long I don't know, but the creator of the locast2plex script noted in his github thread that he wrote to Locast asking if there was "a more official way to login". 

If they even bother to respond with anything other than a copy and paste response that has nothing to do with his question, then just maybe we can end up with a long term solution.   I happen to believe that there must be a way, because TV Everywhere doesn't seem to be affected by Locast's changes.

Edited by mark-in-dallas
Link to comment
Share on other sites

BillOatman
2 hours ago, mark-in-dallas said:

I ended up removing all traces of the locast scripts I'd used, then installing the updated locast2plex, and I'm up and running again.  For how long I don't know, but the creator of the locast2plex script noted in his github thread that he wrote to Locast asking if there was "a more official way to login". 

If they even bother to respond with anything other than a copy and paste response that has nothing to do with his question, then just maybe we can end up with a long term solution.   I happen to believe that there must be a way, because TV Everywhere doesn't seem to be affected by Locast's changes.

One of the things you send to Locast when logging in now is this

?client_id=CqhAMsBw%2BnxTXSJMLGqyOw%3D%3D

Using this, Locast could in theory give a client ID that can bypass Captcha for "certified" client applications.  But seeing as how those scripts spoof GPS location it seems unlikely they would ever be certified.

Edited by BillOatman
Link to comment
Share on other sites

  • 3 weeks later...

I had another locast solution on Windows running and it stopped working earlier in Aug. 2021. I use an old laptop, and decided it was time to put Linux Mint on it again (back and forth sometimes with OS) I only use that machine for locast service to Emby and at somepoint extra room for whatever library might need it.

Aug 28, 2021 I got the locast2tuner project running fine after a bit. Solid so far, day 2. I'm staying with just one local instance from my login to locast for now.

Locast2tuner is a really nice change for using locast in Emby!

Link to comment
Share on other sites

emveepee

All these locast clients broke because of a captcha change last week, you could also have updated locast2plex.  The good news is Locast is supporting developers now.

Martin

Link to comment
Share on other sites

mark-in-dallas

My locast2plex stopped working yesterday too.  I upgraded to the latest release and made sure to use the developer client id, but still a no go and it was erroring  with "internal Server Error" and "invalid login credentials" or something to that effect.

I installed the latest locast2tuner and all is good in the world again.

Edited by mark-in-dallas
  • Like 2
Link to comment
Share on other sites

BillOatman
On 8/29/2021 at 11:26 AM, emveepee said:

All these locast clients broke because of a captcha change last week, you could also have updated locast2plex.  The good news is Locast is supporting developers now.

Martin

The bad news is they lost their lawsuit  ...

Quote

Locast Nation

In the big media companies' lawsuit against Locast, the court just issued a disappointing ruling.  We are evaluating our options and will keep you posted as the situation develops.     

Here is what our legal team had to say:
 

Electronic Frontier Foundation: 
 

"We are disappointed that the court ruled against Locast on its copyright defense. The court interpreted the law in an artificially narrow way. Congress wrote copyright’s nonprofit retransmission exception to make sure that every American has access to their local broadcast stations, and expanding access is exactly what Locast does. This ruling that nonprofit retransmitters can’t use viewer contributions to expand access will do the opposite of what Congress intended. Over 3 million people use Locast to access local TV, including many who can’t afford cable and can’t pick up their local stations with an antenna. This ruling threatens their access to local news and vital information during a global pandemic and a season of unprecedented natural disasters. And it treats copyright law not as an engine of progress but a moat protecting the privileged position of the four giant broadcasting networks."

 

R. David Hosp, Partner Orrick, Herrington & Sutcliffe:  

"We are disappointed in the ruling today and disagree with its conclusions and reasoning.  Our client is in the process of evaluating the decision and formulating next steps. Locast provides a valuable service to its over 3 million users who are otherwise unable to access the over-the-air broadcasts to which they are entitled by virtue of their location or economic circumstances.  Our client remains committed to its mission of delivering free, local broadcast TV service to all Americans, and particularly for those consumers who can’t afford pay-TV services like cable, satellite, or streaming, or who can’t get their local broadcast channels using an over-the-air antenna."

 

 

Edited by BillOatman
  • Like 1
Link to comment
Share on other sites

The court didn't like the way the "donations" and funds were handled but with some careful planning on Locast's part can be handled better moving forward.

But I'm not optimistic about this long term.

  • Like 1
Link to comment
Share on other sites

They put out a new update:

Locast Nation

As you probably know, the federal district court in the Southern District of New York issued a ruling in the case brought against Locast by the big media companies.  The court concluded that by interrupting programming to ask users for donations, and by suspending those interruptions based on whether a user makes contributions, Locast actually was charging a fee, not merely seeking a voluntary contribution.  The court then concluded that revenues Locast collects in this manner exceed the cost of operating the service because funds are used to add new markets, rendering Locast ineligible to use the copyright exemption for non-profits (17 U.S.C. 111(a)(5)).

 

Although we disagree with this interpretation and are exploring our legal options to contest it, out of respect for the court's order,

 

 Locast is suspending immediately all programming interruptions to request donations

 

This means that anyone located in a market we serve who signs up for Locast will get the service without interruption, regardless of whether or not they donate.

 

Of course, it is up to you whether or not to contribute to Locast.  But if you currently contribute, we humbly request that you continue to do so.  And if you don't contribute, we hope that you will do so if you can afford it. 


Thank you.

Link to comment
Share on other sites

Totally agree.  It's a really nice service that's worth trying to keep a live and healthy.

  • Like 1
Link to comment
Share on other sites

emveepee

I just read on the Locast web site that they have suspended operation.  Just means more money for the pirate IPTV providers.

Martin

Link to comment
Share on other sites

BillOatman

Yeah I just got the email ...

Quote

Locast Nation

As a non-profit, Locast was designed from the very beginning to operate in accordance with the strict letter of the law, but in response to the court’s recent rulings, with which we respectfully disagree, we are hereby suspending operations, effective immediately.  

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...