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

opensubtitles.org API available only for logged users #51

Closed
emericg opened this issue Apr 24, 2020 · 11 comments
Closed

opensubtitles.org API available only for logged users #51

emericg opened this issue Apr 24, 2020 · 11 comments
Labels
question Further information is requested

Comments

@emericg
Copy link
Owner

emericg commented Apr 24, 2020

Here is a communication from opensubtitles.org

API REQUESTS MUST BE AUTHENTICATED

With Covid-19 pandemic requests for our API went skyrocket, our servers could not handle so much traffic, so we decided to limit API usage just to authenticated requests for User Agents. In short it means, you have to provide opensubtitles.org username and password in LogIn() method.

We are avare some of user agents doesn't implement authentication for numerous reasons.

What you can do for fix, if your app is affected:
- let your users know about this change
- implement LogIn() into your app with user authentication
- contact us for pricing, so your app can send unathenticated requests (e.g. if you have free and pro version of your app, it is possible free will work only with authenticated requests and pro works as before)

More info on [our forum](https://forum.opensubtitles.org/viewtopic.php?f=11&t=17110)

We are actively blocking IPs, which are sending unathenticated requests

Following a recent policy change from opensubtitles.org, the API is now available only for logged users.
To continue using applications like OpenSubtitlesDownload you simply need to:

Updated
Now as far as I can tell, most users are experiencing these 401 errors, if not every users.
Maybe this limitation triggers only for softwares with high volume of requests, for instance I cannot use kodi embedded subtitles downloader without using an account, but I've been using OpenSubtitlesDownload without account from the same IP.

So let's use this thread to discuss issues with using accounts.
Let me know if you've had success with OpenSubtitlesDownload without using an user account, or if you needed to set one up!

@emericg emericg added the question Further information is requested label Apr 24, 2020
@emericg emericg pinned this issue Apr 24, 2020
@emericg emericg changed the title API only for logged users API available only for logged users? May 26, 2020
@ManuLinares
Copy link

This is my output today:

>> Opensubtitles.org servers refused the connection: 401 Unauthorized.
Please check:
- Your Internet connection status
 - www.opensubtitles.org availability
 - Your downloads limit (200 subtitles per 24h)
The subtitles search and download service is powered by opensubtitles.org. Be sure to donate if you appreciate the service provided!

@joseph-giron
Copy link

This is my output today:

>> Opensubtitles.org servers refused the connection: 401 Unauthorized.
Please check:
- Your Internet connection status
 - www.opensubtitles.org availability
 - Your downloads limit (200 subtitles per 24h)
The subtitles search and download service is powered by opensubtitles.org. Be sure to donate if you appreciate the service provided!

So register on opensubtitles.org, add the username and password to lines 61 and 62 of OpenSubtitlesDownload.py.
Done.

@damagu
Copy link

damagu commented Aug 23, 2020

I tried to use OpenSubtitlesDownload.py for the 1st time today because for quite a while now when I've tried to get subs via Kodi it's failed and I finally decided to try another method. I already registered with opensubtitles.org so when I opened the script to see how it worked and saw you can (or need to) enter a username and password, I went ahead and added them.

Even though I've done that, when I try to use the script I get the same messae as ManuLinares has reported.

Now... this might be related but I'm not sure... Australian ISPs are now required to block access to opensubtitles.org (as well as other subtitle services) so I'm running openvpn to tunnel out of Australia. Currently I have openvpn set to the US so when I use:
wget http://ipecho.net/plain -O - -q; echo 173.XXX.XXX.XXX
... the ip address shown is one from the US .
However, when I use wget to try to get something from opensubtitles.org:
wget https://www.opensubtitles.org/en/subtitleserve/sub/8323684 --2020-08-23 13:21:50-- https://www.opensubtitles.org/en/subtitleserve/sub/8323684 Resolving www.opensubtitles.org (www.opensubtitles.org)... 202.XXX.XX.XXX Connecting to www.opensubtitles.org (www.opensubtitles.org)|202.XXX.XX.XXX|:443... failed: No route to host.
...I was expecting wget to fail seeing as opensubtitles.org now needs login info, but I definitely didn't expect to see an Australian IP in the output.

I don't know why this is happening or what it means or whether it might explain why the OpenSubtitlesDownload.py script isn't working for me but I thought I should mention it just in case.

Any help would be appreciated.

@emericg
Copy link
Owner Author

emericg commented Oct 12, 2020

So register on opensubtitles.org, add the username and password to lines 61 and 62 of OpenSubtitlesDownload.py.
Done.

Same thing happened to me today, 401 errors solved by using my account.
I always had to use my account with kodi for instance, but never with OpenSubtitlesDownload.py, so I don't really know why now?

@FriendlyTroll
Copy link

Just some info regarding using an OpenSubtitles account.

For me this didn't work if I had some long password with underscores like "batboy_cost_smudge_cornbread_overlying_vertical_alto". I'm not sure if this is the issue with the script itself, because the login did work on OpenSubtitles web page with that long password.

When I changed the password to something shorter, with no underscores the script started working again.

@emericg
Copy link
Owner Author

emericg commented Jan 12, 2021

Allright thanks for the report, I"ll have a lot at this issue tomorrow!

@emericg
Copy link
Owner Author

emericg commented Jan 13, 2021

Ok it looks like OpenSubtitles actually limits password to 32 characters, the other ones are just cutted, so I did the similar thing and you should now be able to use long password with underscore again.

I also took this opportunity to improve the 401 error handling. Now there should be a proper explanation directly in the application, indicating how and why the log in is required.

@FriendlyTroll
Copy link

Hi thanks a lot for your effort!

I can confirm it works now with longer password.

@damagu
Copy link

damagu commented Jan 18, 2021

Just letting you know that since I posted my comment, I found out that Australia has started blocking subtitle providers. So my local machine which runs kodi and I used to use to grab subs is not able to connect to opensubs or any other block subtitle site. Now I'll either have to download them to my seedbox and then transfer them to the local machine afterwards (which is what I've been doing recently) or I have to run openvpn on the kodi box so that I can get around the blocks and gain access to the subs sites.

@emericg
Copy link
Owner Author

emericg commented Jan 18, 2021

In France changing the DNS used in the computers or directly in the routers is usually enough to bypass blocked sites, maybe that's worth a try?

@emericg emericg changed the title API available only for logged users? opensubtitles.org API available only for logged users? Feb 23, 2021
@emericg emericg changed the title opensubtitles.org API available only for logged users? opensubtitles.org API available only for logged users Mar 27, 2021
@emericg
Copy link
Owner Author

emericg commented Jan 2, 2024

opensubtitles.org is no more, and neither is this issue.
everyone needs a new account now :)

@emericg emericg closed this as completed Jan 2, 2024
@emericg emericg unpinned this issue Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants