opensubtitles / service.subtitles.opensubtitles_by_opensubtitles

KODI OpenSubtitles.org addon modified by opensubtitles, works without login
https://forum.opensubtitles.org/viewtopic.php?f=8&p=36070
94 stars 36 forks source link

"Error searching for subtitles" since yesterday #23

Closed pitsi closed 3 years ago

pitsi commented 4 years ago

As the title describes, I get this error since yesterday and the addon finds no subtitles. What is worse is that there is nothing relevant reported in kodi's log! I assume that the login credentials are now mandatory, so this version of the addon is completely useless. If there are no plans on fixing it, please announce that it will longer works and close this repo completely.

As a user, I refuse to make any credentials for the site so as to use them with the other addon. The reason is simple: the opensubtitles api is used by tons of players, e.g. vlc, mpc, popcorntime, smplayer and so on, yet it demands credentials on kodi ONLY, which is simply unacceptable.

peno64 commented 4 years ago

Jesus!

pitsi commented 4 years ago

What is your problem @peno64 ? I think I have made myself clear on the subject and that is the policy I follow on idiotic demands from sites etc that ask you to make an account for no reason. If you do not have anything to contribute, please do not comment Also, ignore my "policy on sites that demand you to make credentials for no reason" if it offends you. Thank you.

My question is specific, it is asked to people who actually use this addon and know why they use it, the issue is opened on the right place and the info I gave leaves no room for comments like yours.

morpheus65535 commented 4 years ago

@pitsi As a user of the OS API myself, I can confirm that username and password are now required for most of the software using the API. We are facing the same issue with Bazarr. Nothing else to do other than having a software that can provide credentials or waiting for OS admin to act on their side to "fix" this issue.

pitsi commented 4 years ago

Before opening the issue here, I double checked kodi's bbehavior with 2 friends of mine that use the "regular" version of the addon, the one that requires authentication, and they both said it works for them with no issues. That is when I started thinking that it has become mandatory.

Then I checked if vlc (on windows only), mpc and smplayer (both on windows and linux) as well, and they both downloaded a couple of subtitles with no problem. After that, I got upset and opened this issue here, because it was kinda obvious who was to blame. I also asked on the kodi forums, but I still have not gotten a proper answer.

What is worse is that both the addons are made not by some volunteer but from the owners of the site themselves, so I expect a somewhat official answer here...

peno64 commented 4 years ago

@pitsi "What is worse is that both the addons are made not by some volunteer but from the owners of the site themselves, so I expect a somewhat official answer here..." You are wrong there. These addons are made by volunteers and opensubtitles by opensubtitles for sure because this addons is even not in the kodi repo. The original opensubtitles addon was also made by a volunteer but he was so good to provide his addon to the kodi community and they added it to their repo but that's it. The kodi repo contains the opensubtitles addon that has always required a login. This addon is a fork of that original one and modified that login wasn't required anymore. But the website opensubtitles.org has changed something to their api such that login is now always required. If other programs don't have a problem then they most probably don't use the opensubtitles.org API but another way to get to the subtitles. You can't blame the developers of this addon that opensubtitles.org has changed something and you cannot demand to the developers of this addon that they don't use the API anymore but another method.

You are so rude!

pitsi commented 4 years ago

Is there some proof that the addons are made by a volunteer? Because all I see here is a user named "opensubtitles" that owns 2 repos on github, one for each addon. On top of that, there is this thread here, on the opensubtitles forum, discussing the availability of this addon, and it was started by someone who seems to be an admin there https://forum.opensubtitles.org/viewtopic.php?t=15847 Isn't that enough proof that the addon is official and not made from some volunteer, although it is not on kodi's main repo?

But the website opensubtitles.org has changed something to their api such that login is now always required.

Also, do you have something that can support that claim? I think of the same, but I have no way to prove it.

As for the other apps. I am pretty sure they do use the api itself, and I am willing to open an issue on every single one of them and ask about it if you wish, provided that they have a github page. Ok, maybe not for every single one of them, because the devs of vlc do not answer stuff on github, so I exclude vlc.

And yes I am rude. I refuse to make accounts to access any service that is free-to-access for others but not for me.

peno64 commented 4 years ago

Whole kodi is developed by volunteers...

I have made my own program to get subtitles from opensubtitles.org via the API and a login is required by the API. Without it you can't use the API.

peno64 commented 4 years ago

http://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC

it is REQUIRED that your implementation supports LogIn() with user credentials (manually input user and password), because there are quite a lot of IPs, which are proxy (some service providers NAT, Singapore, Iran and others), and there is download limit per IP, so those users will hit limit very soon and OS will be not usable for them. Also there is other important reasons why to support this (VIP membership and so on). Also NEVER put in your application registered username and password, it might be blocked.

peno64 commented 4 years ago

"Also NEVER put in your application registered username and password, it might be blocked."

I guess the latter has happened. So many users are using kodi and opensubtitles these days that opensubtitles.org has blocked that default user by the addon.

This could also happen with those other applications if they are used so much.

pitsi commented 4 years ago

About the required credentials to use the api and how other apps work There are quite a few files in subliminal's source code, that prove it uses the api but has no credentials on it, e.g. this one https://github.com/Diaoul/subliminal/blob/dd74383d1cba82829ce720f2e439a65d13ffe7ef/tests/cassettes/opensubtitles/test_query_query_movie.yaml

And the same applies to vlc's vlsub https://github.com/exebetche/vlsub/blob/3d1998f46d750031ab733c97fac45d7a8be712fd/vlsub.lua

And for subdownloader here https://github.com/subdownloader/subdownloader/blob/c04af40d4bd7d789cc3afdbbc01835bc3764570c/subdownloader/provider/opensubtitles.py

And yet, they all work without them. I stopped checking the source code of other apps, because I think I have made my point.

Also, after reading the api's documentation, I noticed that there is a 407 error for when some app reaches the download limit. The limit is also mentioned.

if you get 407 Download limit reached, do not use persistent connections (HTTP keep-alive) and don't download more than 200 subtitles per 24 hour per IP/User. If user wants more, he can ​Become OpenSubtitles VIP member - thats one of the many reasons, why your app should allow user to login.

And even that is completely different from my issue, because I did not get the 407 error! I did not get a 403 error either, which is for the missing credentials.

To sum things up, because the addon seems to be working again since last night, I will close the issue by 7pm local time (gmt +2). If you have anyhing to add to the api conversation, you are welcome.

peno64 commented 4 years ago

Well you are wrong that they don't use a login name and password:

https://github.com/subdownloader/subdownloader/blob/c04af40d4bd7d789cc3afdbbc01835bc3764570c/subdownloader/provider/opensubtitles.py

self._xmlrpc.LogIn(str(self._settings.username), str(self._settings.password), 'en', str(self._settings.get_user_agent()))

https://github.com/exebetche/vlsub/blob/3d1998f46d750031ab733c97fac45d7a8be712fd/vlsub.lua

LogIn = { params = function() openSub.actionLabel = lang["action_login"] return { { value={ string=openSub.option.os_username } }, { value={ string=openSub.option.os_password } }, { value={ string=openSub.movie.sublanguageid } }, { value={ string=openSub.conf.useragent } } }

https://github.com/Diaoul/subliminal/blob/dd74383d1cba82829ce720f2e439a65d13ffe7ef/tests/cassettes/opensubtitles/test_query_query_movie.yaml

Contains quite some binary code so probably the login is hidden in there.

pitsi commented 4 years ago

Please show me, in their code something that points to an existing username and a password... It is a different thing to support credentials and to demand credentials. Here is a pic of opensubtitles by opensubtitles options that gives the user to enter his credentials. Does it work without them? Yes, that is the reason of its existence! screenshot000

Moreover. Subdownloader offers the option for uploading a subtitle

$ subdownloader --help
...
  -U, --upload          Upload subtitle(s).
...

and for that function alone, credentials are required. And subliminal offers a way to enter credentials too, although they are not needed at all

$ subliminal --help
Usage: subliminal [OPTIONS] COMMAND [ARGS]...
...
  --opensubtitles USERNAME PASSWORD OpenSubtitles configuration.
...

Vlsub also has the option for credentials. 2020-03-28-085744_576x287_scrot

If you wish, I can make a comment later on on which I will download subtitles with all of the above to prove that there is no need for credentials on them. Apparently, all will be on their stock configuration and the full command I will use will be shown for subliminal and subdownloader.

pitsi commented 4 years ago

As I had promised, here are the outputs of all the forementioned apps at work, without a single sign of login credentials

Subdownloader

$ subdownloader -c -i -l en
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]100% Time: 0:00:00
1/0 videos/subtitles have been found
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]100% Time: 0:00:00
Search finished.
- Chernobyl.S01E01.BDRip.X264-REWARD.mkv
  [EN] Chernobyl.S01E01.720p.BluRay.X264-REWARD.srt (35175 bytes)
       < > [  0] Chernobyl.S01E01.720p.BluRay.X264-REWARD.srt [opensubtitles]
What subtitle would you like to download? [0-1) 0
Selected subtitle: [EN] Chernobyl.S01E01.720p.BluRay.X264-REWARD.srt (35175 bytes) [opensubtitles]
Number of subs to download: 1
- [EN] Chernobyl.S01E01.720p.BluRay.X264-REWARD.srt (35175 bytes) [opensubtitles]

Subliminal

$ subliminal download -p opensubtitles -l en -v .
1 video collected / 0 video ignored / 0 error
Downloading subtitles  [####################################]  100%                                        
1 subtitle downloaded for Chernobyl.S01E01.BDRip.X264-REWARD.mkv

The verbose (-v) output of subliminal is that line at the bottom only!

And an image from vlsub 2020-03-29-103558_641x392_scrot

If you wish, it is now your turn to prove the opposite,

pitsi commented 4 years ago

Since the conversation here revolved more around my denial to make an account rather than the problem itself, I had promised not to post again because it seems I was wasting my time. However, because the problem appeared again and it now occurs on other apps too, I am reopening it.

On top of that, I have some found some more info on how the api treats every app that wants to access it, with the help of a friend that knows python. I won't post what I have found though, it will remain between him and me. I have obviously patched my addon and I can access the api for now.

Plus, 10 days have passed and I have seen no proofs for the opposite, so I won't waste more time with proof from other apps. Have a nice day.

doko-desuka commented 4 years ago

Hi @pitsi, you're not the only one having problems using this add-on, I'm the same.
We all benefit from sharing information, just as you benefited from your friend sharing his knowledge to help you fix the script.

In these modifications you made, do you still have to use a password and login, or are you somehow using the API without them? It's not clear if they're required or not.

pitsi commented 4 years ago

As I said in the relevant thread on kodi's forums a couple of days ago. The patch will not be made public because, as someone said over there, it violates opensubtitles's terms of service. It works without any credentials though. Besides that, it is my decision not to publish anything because of the arrogant behaviors of some people here and on the kodi forums. Here is the thread in case anyone wants to have a look. There is also a link to imgur with screenshots as a proof that it works without credentials https://forum.kodi.tv/showthread.php?tid=352834

Officially, there is this thread/announcement on opensubtitles' forum that covers every app, but it was made just ~1 week ago https://forum.opensubtitles.org/viewtopic.php?f=11&t=17110

Now that there is an official statement for the api, I will consider making a set of credentials on the site, provided that I can delete them whenever I wish in the future. But for now, I will stick to my patched version of the addon. Thank you :)

peno64 commented 4 years ago

If you read this thread, there is only one person @pitsi very arrogant...

doko-desuka commented 4 years ago

Well, he did provide the information I was asking for.
@pitsi from the thread you linked to:

We took the decision to use API for logged-in users only. What that means:

  • you need to provide your opensubtitles.ORG username and password for client, app, program, script etc you are using
  • if the application doesn't support to configure this, contact app developers to give this option, it is against our API rules to not have this option implemented.

That's all I needed to know, thanks. I'll add my credentials to the settings of the Kodi add-on.

PS: If one has a problem with creating an account in there, just think of it as a throwaway account with "password123", that sort of thing. You're only interested in the subtitles after all, you're not gonna use it for other things.

pitsi commented 4 years ago

@peno64 I refuse to start a conversation about arrogant devs and users, because it will be endless. In case Ihave not mentioned it here, the main reason I refuse to contribute to kodi by any means is the behavior of specific devs. If you wish, I can show you my threads on the kodi forum to see the answers I got on the issues I reported. Or you can check yourself, if you have an account there.

@doko-desuka Yes, you can use a throwaway mail account for opensubtitles.org. However, now that the api is closed for non-registered users, this addon has no purpose of existence and you'd better use the other one.

peno64 commented 4 years ago

You must mean this thread: https://forum.kodi.tv/showthread.php?tid=352834&highlight=opensubtitles Arrogance over the top I see there and it is not from the devs

peno64 commented 4 years ago

And about your "solution" to access the opensubtitles api without a login you most probably are doing this: https://trac.opensubtitles.org/projects/opensubtitles/wiki/XML-RPC-debugger So you are using the OSTestUserAgentTemp account to access the api. Shame on you and your friend! I hope opensubtitles bans your ip address.

doko-desuka commented 4 years ago

Coming back here to report on what works:

From within Kodi, go to Add-ons > Download > Subtitles > OpenSubtitles, and install it (if you don't have done so already). This grabs it from the official Kodi add-on database. Wait for it to install.
When done, long-press / right-click on that same item and choose "Settings", then add your username and password -- write carefully to make sure there's no typos.
Now you can start playing a video and get subtitles with that add-on.

pitsi commented 4 years ago

From within Kodi, go to Add-ons > Download > Subtitles > OpenSubtitles, and install it (if you don't have done so already). This grabs it from the official Kodi add-on database.

This is not the addon we are discussing here, but the one... next door, from here https://github.com/opensubtitles/service.subtitles.opensubtitles

And that addon always demands credentials in order to work since v5.0.15, which was released 3+ years ago.

pitsi commented 4 years ago

@peno64 Since my thread on the kodi forums was locked before I even had the chance to read the new posts there, because I usually rest or sleep at 10 or 11pm (local time when your comment was made), let me answer you here. No, it is not that "ostestuseragenttemp" account I have used. And no, I would not respond arrogantly if I did not receive arrogant answers in the first place, like the one for the tinfoil hat. Also, in the past, when I asked for help on some very advanced issue, an aswer I got was "if you do not like it, ask your money back". What would you do in that situation and what would behavior be in the future? Answer me if you want.

Ontopic, I am a few clicks away from registering an account there and put an end to this drama. Can I delete it in the future if I wish to? And if so, how?

peno64 commented 4 years ago

Yes you can delete an account on opensubtitles.org. After login you click on your username to see all your info and there you have a button 'Delete account'

pitsi commented 4 years ago

Thank you :) I would appreciate an answer on the other question too.

doko-desuka commented 4 years ago

What would you do in that situation and what would behavior be in the future?

You ignore the offenses and ask again with simpler wording so that someone else may answer (you want to catch that person that knows the answer and also likes to help).

How you react to the offense is what's important. How about laughing it off? "Oh, I already have a tinfoil hat, thanks". But completely ignoring it, as if it never happened, is a safe choice.

But anyway, I've been called worse -- we just ignore and focus on what's useful to us.

pitsi commented 4 years ago

Let me get some things straight.

I am not good at coding. That is the core reason I spend most of my time filling issue and bug reports for the projects I use. If I was good, I would also help solving them. I help though in any way I can, e.g. by reproducing an issue on my system so as say "it happens here as well" or even "maybe it is because of this" and help troubleshoot it. After so many reports, because I started back when google code was a thing, I have become really good at reporting stuff. So good in fact that most of the time my reports leave little to no room for extra questions. You can see this at the very first message on this issue. If there was something more I could add, e.g. some line from the log, I would.

All those years I have come accross all sorts of devs, maintaners and users and I have examples that would cover hours of conversation. But lets put them on one line... On the one end of the line there are the very good ones who are like

And on the other end, there are the very bad ones who are like

This led me to a rule, or "rule no1": I do not respect anyone who does not respect me. And on that line, I try to stand somewhere in the middle when I make a report and start the conversation. The where I will be when the conversation ends depends on the others too. And no, I do not sit and just accept insults.

That's all I have to say. If you do not believe this part of my claims

Also, in the past, when I asked for help on some very advanced issue, an aswer I got was "if you do not like it, ask your money back". What would you do in that situation and what would behavior be in the future?

feel free to check my threads and posts on kodi's forums, as it is all there. Scripta manent.

doko-desuka commented 4 years ago

Gosh, you talk so much.
Nobody cares about your history reporting bugs. Nobody is gonna go through your posts to "verify" what you're saying. Get a life.

My #1 rule is, if you can't synthesize it on one paragraph then find a way to do it, otherwise it's not worth saying.

pitsi commented 4 years ago

Yea, I do talk too much. If you do not like what I said, feel free not to read it and reply with a "tldr". My point is that I treat others the way they treat me, and I know people that do the same for devs on projects bigger than kodi, e.g. kde or firefox. To sum everything up, it was not the first time I received some bad attitude on kodi forums. This was the first time I answered back though.

There, all on one paragraph to make you happy.

doko-desuka commented 4 years ago

That's my kind of writing! Haha. Thanks.

mastachaos commented 4 years ago

I'm getting this same error, despite having my credentials saved.

mstargard commented 4 years ago

I was getting the same issue and had a poke at it just now. I did a packet trace at my firewall and found that the web call is in the clear to cloudflare, and returns a 503. I'm going through a VPN provider. So I turned off the VPN, and it started working. I brought the vpn back up and it's working again. Not sure what's up here, but maybe this is a cloudflare issue?

pitsi commented 4 years ago

@mstargard I think that your issue is completely different to mine, no offence. I use neither a firewall, nor a vpn, thus the problem for me is just an api "malfunction".

pitsi commented 3 years ago

Time to close this issue. Kodi 19 was released a few days ago and this version of the addon is not compatible with python3, so it no longer works. I doubt it will ever work again, because it has been unmaintained for the last 3+ years. So, borrowing debian's quote for the death of everything related to python2:

python2 only; dead upstream; low popcon; alternatives exist

p.s. @peno64 and @doko-desuka: I just wanted to let you know that you are now on my block list because of your comments above.

pitsi commented 2 years ago

For the ones that still think that making an account for no reason is no big deal. https://forum.opensubtitles.org/viewtopic.php?t=17685

Hacked on August 2021, announced on January 2022. Usernames, passwords, emails, ip addresses etc, all leaked and I am glad nothing mine is in them!

pitsi commented 9 months ago

The following screenshot is dedicated to @peno64 and @doko-desuka. I have temporarily unblocked you both so as to see the "benefits" of the garbage api you supported back then (and you probably still do), now that the .org api has completely shut down for non paying users and the .com api is the only way to go, with mandatory credentials.

It's from the page of opensubtitles.com and, omg, it does track what I downloaded so as to suggest me other subs in languages I am not even interested in! What a great piece of TRASH!

2024-01-02-155714_1280x1024_scrot

peno64 commented 9 months ago

Interesting that you call a feature trash. It's logical that they want a user name such that they can check if you are not spamming the site. And if so they can block you. @pitsi you also have an account here on github, don't you and you even used it to block me for your own reasons. And that user information with password were stolen in the past. Unfortunately it happens, even with the best. That is also why you should have different passwords for all your accounts. I have that. So if your credentials are stolen then no harm is done at all.

pitsi commented 9 months ago

Ok, if you consider it a feature, please tell me why I should care if a subtitle was translated in a language I don't use or even understand. I care more about the api keeping a log on me and what I have downloaded than this. If I didn't, I would not mask the titles above.

As for github (first and last offtopic reply I give), and correct me if I am wrong, there was a notification sent to everyone to change their passwords when it happened. Was something similar done from opensubtitles? Not until 6+ months later that they revealed the incident. Do not forget that github forces 2fa.

doko-desuka commented 9 months ago

The following screenshot is dedicated to @peno64 and @doko-desuka. I have temporarily unblocked you both so as to see the "benefits" of the garbage api you supported back then (and you probably still do)

Lots to unpack in there, but the biggest take is:

I don't really care what information Opensubs asks of me.
If they want an account and a password then I can absolutely give them one. I'm sure they have tons of bots trying to scrape their content, it's completely reasonable to have you identify yourself before interacting with their API. PS to avoid giving them credentials is not to be anonymous. Every web request that comes out of your modem is giving them your external IP. They already had everything that they needed to keep a log on you, even with "anonymous" usage. They know that the IP address "xxx.yyy.zzz.www" requested such and such subtitles. To associate the requested subtitles with an account name, or with the raw IP, makes little difference to their backend.

We do need to update this Kodi add-on to use the new API though, as detailed in an email with these two links:

Please have a great year, I hope you accomplish everything that you set out to do. All the best to the OpenSubs team as well.

peno64 commented 9 months ago

@doko-desuka

"We do need to update this Kodi add-on to use the new API though, as detailed in an email with these two links:"

The update is there already for a long time. Its in the standard kodi repo and it's called opensubtitles .com Also a4kSubtitles is adapted to use the new .com API

doko-desuka commented 9 months ago

@peno64 ah, ok. I can see it in the mirrors directory, thanks for letting me know: https://mirrors.kodi.tv/addons/omega/service.subtitles.opensubtitles-com/

I'm gonna have to backport it to my 18.9 Leia then, as I'm a dinosaur that doesn't use the latest Kodi. Leia works fine for my uses, so me updating it would only introduce the chance for problems.

peno64 commented 9 months ago

@doko-desuka

If you do the backport, could you send me the changes? I made a version that supports dual subtitles (https://github.com/peno64/service.subtitles.opensubtitles-com-dualsub) and it would be nice if it would also support Leia because other people also asked for it.

doko-desuka commented 9 months ago

Sure. Sadly you can't have a single add-on that supports multiple Kodis because the Python module changes, this line here from addon.xml: <import addon="xbmc.python" version="3.0.0"/>

In Leia that must be, at most, 2.26.0. So what people do is make a branch on their repo, like a tag for Leia and a tag for the master, that is for Matrix and up.

peno64 commented 9 months ago

@doko-desuka

Yes you can. You can just ommit that import line. It will still work and is really not needed since kodi always has python available.

peno64 commented 9 months ago

@doko-desuka

See for example https://github.com/peno64/service.subtitles.opensubtitles_by_opensubtitles_dualsub/blob/main/addon.xml

doko-desuka commented 9 months ago

@peno64 Interesting. Do you know if the lack of an import line for the Python component will cause a log message?

peno64 commented 9 months ago

@doko-desuka

Just tried it. No log of any kind about it.

peno64 commented 9 months ago

@doko-desuka

Note however if you would want to put the addon in the standard kodi repo that it will not be accepted by the kodi purists but I guess that is not of your concern.

doko-desuka commented 9 months ago

but I guess that is not of your concern.

Yeah, I usually keep my add-ons to myself nowadays. The last thing I did was "StreamCatcher" a (local) Chrome browser extension that lets you send stuff for Kodi to play: https://github.com/doko-desuka/StreamCatcher
So on your phone you go to a website that tries to play something, the extension blocks that request, then passes the URL/headers/cookies to Kodi so it can play it instead. I've been using it daily.