pannal / Sub-Zero.bundle

Subtitles for Plex, as good you would expect them to be.
Other
1.76k stars 120 forks source link

Addic7ed / Anti-captcha bug : No show id found #686

Closed pousterlus closed 4 years ago

pousterlus commented 4 years ago

Hi there,

I've funded my anti-captcha account and configured the API key accordingly in SZ. I've also configured my Addic7ed credentials in SZ.

But for every search, it can't find the show id :

2019-10-16 12:35:39,779 (80539b300) :  INFO (logger:38) - subliminal_patch.core: Using 4 threads for 4 providers (['subscene', 'tvsubtitles', 'opensubtitles', 'addic7ed'])
2019-10-16 12:35:39,787 (805c92200) :  INFO (logger:38) - subliminal_patch.core: Listing subtitles with provider 'addic7ed' and languages set([<Language [fr]>])
2019-10-16 12:35:39,787 (805c92200) :  INFO (logger:38) - subliminal_patch.core: Initializing provider addic7ed
2019-10-16 12:35:39,788 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Addic7ed: using random user agents
2019-10-16 12:35:39,797 (805c92200) :  DEBUG (logger:28) - subliminal_patch.http: DNS: Using www.addic7ed.com=46.105.102.174 from cache
2019-10-16 12:35:54,871 (805c92200) :  DEBUG (logger:28) - subliminal_patch.http: DNS: Using www.addic7ed.com=46.105.102.174 from cache
2019-10-16 12:36:09,933 (805c92200) :  DEBUG (logger:28) - subliminal_patch.http: DNS: Using www.addic7ed.com=46.105.102.174 from cache
2019-10-16 12:36:13,989 (805c92200) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Login expired
2019-10-16 12:36:14,006 (805c92200) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Logging in
2019-10-16 12:36:14,095 (805c92200) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Error, trying again. (1/3)
2019-10-16 12:36:14,188 (805c92200) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Error, trying again. (2/3)
2019-10-16 12:36:14,279 (805c92200) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Error, trying again. (3/3)
2019-10-16 12:36:14,279 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Addic7ed: Logged in
2019-10-16 12:36:14,279 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id with year
2019-10-16 12:36:14,280 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id
2019-10-16 12:36:14,280 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id with year
2019-10-16 12:36:14,280 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id
2019-10-16 12:36:14,281 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id with year
2019-10-16 12:36:14,281 (805c92200) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id
2019-10-16 12:36:14,281 (805c92200) :  ERROR (logger:34) - subliminal.providers.addic7ed: No show id found for 'XXX (2015)' ({'year': 2015})
2019-10-16 12:36:14,284 (80539b300) :  INFO (logger:38) - subliminal_patch.core: Terminating provider addic7ed

I tried with 4 different shows, same issue. Is Addic7ed broken again ?

-- Léo.

pannal commented 4 years ago

Hmm it can't login. I'll have a look this weekend. In the meantime can you double check your credentials?

pousterlus commented 4 years ago

Hi pannal,

Thanks for answering so fast, and for your support to this community. I double checked it, tried to copy/paste it for a triple check... same issue.

I hope Addic7ed hasn't messed your auth mech up... AGAIN :) See you in a few days.

-- Léo.

(edit : in the logs above, there is line stating : 2019-10-16 12:36:14,279 (805c92200) : DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Addic7ed: Logged in Are you sure the problem comes from the login ?)

pousterlus commented 4 years ago

Hi again,

For information, I went to the anti-captcha.com customer dashboard, and it seems there weren't any requests from SZ : the dashboard states "0 requests" for any day. I also double check the API key.

Maybe the issue is for anti-captcha instead of Addicted...

-- Léo.

pannal commented 4 years ago

Just the way they implement recaptcha has changed. Develop-2.6 should have the fix for your issue. Please report back!

pousterlus commented 4 years ago

Hey pannal,

Thanks for having a look into this. Captcha's correctly solved :

2019-10-19 11:38:50,207 (8052e3300) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Login expired
2019-10-19 11:38:50,223 (8052e3300) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Logging in
2019-10-19 11:38:50,274 (8052e3300) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Solving captcha. This might take a couple of minutes, but should only happen once every so often
2019-10-19 11:39:05,957 (8052e3300) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Addic7ed: Logged in
[...]
2019-10-19 11:39:05,961 (8052e3300) :  ERROR (logger:38) - subliminal.providers.addic7ed: No show id found for u'How to Get Away with Murder' ({'year': 2014})

But still no id found (it exists on Addicted website).

-- Léo.

pannal commented 4 years ago

Can you try again with the latest develop-2.6?

pousterlus commented 4 years ago

Just did :

[leo@nikky /usr/local/.../Sub-Zero.bundle]# git pull
Contents/Libraries/Shared/subliminal_patch/providers/addic7ed.py | 4 +++-

Then restarted PMS. Checked the version :

vim ../../Plug-ins/Sub-Zero.bundle/Contents/Info.plist
Version 2.6.5.3161 DEV

Tried to fetch the same subtitle :

2019-10-19 22:55:22,358 (80540a400) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Re-using old login
[...]
2019-10-19 22:55:22,360 (80540a400) :  ERROR (logger:38) - subliminal.providers.addic7ed: No show id found for u'How to Get Away with Murder' ({'year': 2014})

No luck, sorry.

-- Léo.

(edit : tried with another show, same issue)

pannal commented 4 years ago

Interesting, will debug further.

pannal commented 4 years ago

OK that's weird. I can get a show ID for that exact query. Can you stop your PMS, remove the SZ folder, then re-checkout develop-2.6? Settings won't be lost.

Edit: Also I'll need a full DEBUG log (see Wiki), if this persists

pannal commented 4 years ago

There actually was an issue with the show IDs. Please re-try with latest develop-2.6.

Edit: This was harder to debug than thought, as there were no errors, but the internal parser failed silently on a Japanese series with foreign characters in the name. It should work now properly.

pousterlus commented 4 years ago

I did exactly what you said. Stopped PMS. Reinstalled SZ with latest dev-2.6.

Same issue :

INFO (logger:38) - subliminal_patch.providers.addic7ed: Addic7ed: Re-using old login
DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id with year
DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id
DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Not refreshing show ids, as the last fetch has been too recent
DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Trying show ids: set(['murder 2014'])
DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Getting show id with year
DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Not refreshing show ids, as the last fetch has been too recent
subliminal.providers.addic7ed: No show id found for u'How to Get Away with Murder' ({'year': 2014})

Here are the complete logs you asked for.

Plex Media Server Logs_2019-10-20_14-31-54.zip

-- Léo.

pannal commented 4 years ago

Hey, OK, this is super weird. I can't really see anything in your logs, though, as there are no subzero logs inside that zip. They should be inside the PMS Plugin Logs folder inside Plex Media Server/Logs.

pannal commented 4 years ago

Found another issue with the show ids; please try again!

pousterlus commented 4 years ago

I tried again :

git pull
Contents/Libraries/Shared/subliminal_patch/providers/addic7ed.py | 14 +++++++-------

Then restarted PMS : Still no show id found !

Sorry about the Logs, I used the method explained on PMS website. Here are the SZ specific logs.

com.plexapp.agents.subzero.log

-- Léo.

pousterlus commented 4 years ago

Is there a way to increase the level of verbosity of the logs ? I would be curious to analyse the parser's results...

-- Léo.

pannal commented 4 years ago

I'll get you a test branch with better logging. This is an extremely isolated issue and I haven't been able to reproduce it yet.

pousterlus commented 4 years ago

I understand, sorry for being a bummer. At least you've found some side bugs in the showlist to fix :)

And thanks for your support, I'll wait for the test branch to be ready, there's no hurry.

-- Léo.

pannal commented 4 years ago

There you go: https://github.com/pannal/Sub-Zero.bundle/tree/addic7ed_show_id_test

This dumps all the interesting output, so be prepared for big log files.

pousterlus commented 4 years ago

Done !

I'm going to dig into the logs now. If you're also up to, here they are :)

com.plexapp.agents.subzero.log

-- Léo.

pousterlus commented 4 years ago

Didn't figured it out yet, but I tried with another show (french subtitles are not in Plex but are on Addicted).

another_com.plexapp.agents.subzero.log

I'm still investigating, testing things out...

-- Léo.

pannal commented 4 years ago

That's interesting. You have empty show IDs stored. Let me fix that.

pannal commented 4 years ago

Pushed another commit, which forces a show ID refresh if the cached data is empty (but existant).

pousterlus commented 4 years ago

Bingo, something new came up.

2019-10-21 16:20:55,185 (8052e1500) :  INFO (logger:38) - subliminal_patch.providers.addic7ed: Getting the page of show id 6928, season 2
2019-10-21 16:20:55,726 (8052e1500) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Ignoring subtitle with status Terminé
2019-10-21 16:20:55,726 (8052e1500) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Ignoring subtitle with status Terminé
2019-10-21 16:20:55,726 (8052e1500) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Ignoring subtitle with status Terminé
2019-10-21 16:20:55,727 (8052e1500) :  DEBUG (logger:28) - subliminal_patch.providers.addic7ed: Ignoring subtitle with status 27.82% Terminé

Subtitle files are correctly spotted ! 🥇 But something seems to be wrong with the status recognition : in french "Terminé" means "Completed", so SZ should consider it OK and should download it.

I think Addic7ed shows the french version of the "Completed" status because of my french IP.

-- Léo.

pannal commented 4 years ago

Great, I'll have a look at that status thing later.

pannal commented 4 years ago

Pushed a fix for that as well, to develop-2.6. Closing your test branch.

Edit: I think Addic7ed shows the french version of the "Completed" status because of my french IP. - they actually store the language value inside your account. I've changed the way incomplete subtitles are handled. It now detects % inside the field instead of checking for "Completed".

pousterlus commented 4 years ago

Thanks a lot, everything's fine now and subtitles are correctly downloaded. You're the Sub-Hero ! :)

-- Léo.

pannal commented 4 years ago

I'll keep this open until the new version is released.