[Queue-Script] FakeDetector - early detection of fake videos

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
dagoob
Posts: 21
Joined: 15 Jan 2016, 23:27

Re: [Queue-Script] FakeDetector - early detection of fake vi

Post by dagoob » 28 Nov 2016, 05:06

Awesome. Thanks!

war59312
Posts: 47
Joined: 12 Feb 2013, 04:52
Location: U.S.A
Contact:

Re: [Queue-Script] FakeDetector - early detection of fake vi

Post by war59312 » 12 Feb 2017, 19:04

ezhik wrote:If anybody is running into issues with PasswordDetector or FakeDetector complaining about:

ERROR Post-process-script PasswordDetector.py for **** failed (terminated with unknown status)
ERROR Post-process-script FakeDetector.py for **** failed (terminated with unknown status)

Most likely it is due to temp_file_name issue.

To fix this, open both files and update the following:

From:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/PasswordDetector/' + os.environ.get(Prefix + 'NZBID')

To:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/PasswordDetector/' + re.sub("\D", "", os.environ.get(Prefix + 'NZBID'))


Same for Fake Detector:

From:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/FakeDetector/' + os.environ.get(Prefix + 'NZBID')

to:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/FakeDetector/' + re.sub("\D", "", os.environ.get(Prefix + 'NZBID'))


PS. Encountered this with 16.4.
Hi,

I'm having a similar issue, but sadly above does NOT fix it.

This is what I am seeing in the log:
ERROR Sun Feb 12 2017 13:48:36 PasswordDetector: Failed 53b4cd4c6a0c4436be44f735708e92e8.part17.rar: [Errno 2] No such file or directory
ERROR Sun Feb 12 2017 13:48:36 FakeDetector: Failed 53b4cd4c6a0c4436be44f735708e92e8.part17.rar: [Errno 2] No such file or directory
The files do exist, under "InterDir".

Running latest PasswordDetector and FakeDetector on NZBGet 17.1 built from official source on Ubuntu 16.04.

Thanks,

Will

Edit: Sadly, happening with NZBGet 18.0 as well. :o

Must be some odd permission error. Never had this problem before.

Departed
Posts: 25
Joined: 14 Oct 2017, 02:15

FakeDetector ... am I using this right?

Post by Departed » 27 Feb 2019, 14:40

Hoping to get a little help with the FakeDetector script. I'm seeing a lot of errors in the log, so I'm not sure if it is working correctly. Can someone take a look at these log entries and let me know if they are normal? Thanks!

Code: Select all

Wed Feb 27 2019 09:30:13	FakeDetector: httplib.InvalidURL: nonnumeric port: 'FFL>7QMfid8v'
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 793, in _get_hostport
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: (self.host, self.port) = self._get_hostport(host, port)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 751, in __init__
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: self._connection = host, httplib.HTTPConnection(chost)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1386, in make_connection
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: h = self.make_connection(host)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1300, in single_request
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: return self.single_request(host, handler, request_body, verbose)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1280, in request
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: verbose=self.__verbose
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1599, in __request
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: return self.__send(self.__name, args)
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1240, in __call__
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: nzbget.editqueue('FileMoveTop', 0, '', [file_id])
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/Users/bink/Library/Application Support/NZBGet/scripts/FakeDetector.py", line 347, in sort_inner_files
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: sort_inner_files()
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/Users/bink/Library/Application Support/NZBGet/scripts/FakeDetector.py", line 418, in main
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: main()
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: File "/Users/bink/Library/Application Support/NZBGet/scripts/FakeDetector.py", line 457, in <module>
INFO	Wed Feb 27 2019 09:30:13	FakeDetector: Traceback (most recent call last):

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by hugbug » 27 Feb 2019, 17:13

These errors are not normal. They probably occur because the script doesn't properly encode username and password when connecting to nzbget. Check ControlUsername and ControlPassword in nzbget settings and if they contain special characters try removing them.

Departed
Posts: 25
Joined: 14 Oct 2017, 02:15

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by Departed » 27 Feb 2019, 17:51

That worked, thank you!

I would consider this a bug. Since NZBGet allows special characters in the password, it seems strange that those characters would cause a problem in this script. It's easily fixed by removing the special characters, but it isn't immediately apparent why the errors are occurring.

Thanks again for the help!

EC28
Posts: 1
Joined: 14 Jan 2020, 14:13

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by EC28 » 14 Jan 2020, 14:15

I'm getting this error when trying to execute the command. Has anyone seen this? Thanks!

Code: Select all

Traceback (most recent call last):
  File "./FakeDetector.py", line 79, in <module>
    bannedMediaExtensions = os.environ.get('NZBPO_BANNEDEXTENSIONS').replace(' ', '').split(',')
AttributeError: 'NoneType' object has no attribute 'replace'
This is what the code currenty reads as:

Code: Select all

bannedMediaExtensions = os.environ.get('NZBPO_BANNEDEXTENSIONS').replace(' ', '').split(',')
And this is what I have the banned extensions set as if it matters:

Code: Select all

BannedExtensions= '.cbr', '.exe', '.com', '.pif', '.scr', '.bat', '.cmd', '.lnk', '.url', '.html', '.htm', '.pdf' 

ezhik
Posts: 15
Joined: 10 May 2016, 20:33

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by ezhik » 11 Jun 2020, 23:14

Could somebody migrate this to python3 ?

prinz2311
Posts: 466
Joined: 08 Dec 2012, 00:03

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by prinz2311 » 11 Jul 2020, 00:45

My fork is py2 and 3 compatible. Tested with 3.7+

I added a few other changes:
- added xmlrpclib_to lib (supports timeout, to prevent hanging script when calling nzbget to sort nzb)
- add 'RARBG_DO_NOT_MIRROR.exe' , 'File Renamer' to allowed list
- make check of allow list case insensitive

https://github.com/Prinz23/FakeDetector

moli87
Posts: 1
Joined: 05 Sep 2021, 21:17

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by moli87 » 05 Sep 2021, 21:19

prinz2311 wrote:
11 Jul 2020, 00:45
My fork is py2 and 3 compatible. Tested with 3.7+

I added a few other changes:
- added xmlrpclib_to lib (supports timeout, to prevent hanging script when calling nzbget to sort nzb)
- add 'RARBG_DO_NOT_MIRROR.exe' , 'File Renamer' to allowed list
- make check of allow list case insensitive

https://github.com/Prinz23/FakeDetector
Hi i got now following error in NZBGet 21.1:

INFO Sun Sep 05 2021 23:11:07 FakeDetector: AttributeError: 'NoneType' object has no attribute 'replace'
INFO Sun Sep 05 2021 23:11:07 FakeDetector: bannedMediaExtensions = os.environ.get('NZBPO_BANNEDEXTENSIONS').replace(' ', '').split(',')
INFO Sun Sep 05 2021 23:11:07 FakeDetector: File "/downloads/scripts/FakeDetector.py", line 96, in <module>
INFO Sun Sep 05 2021 23:11:07 FakeDetector: Traceback (most recent call last):

How can i fix that?

snikay
Posts: 2
Joined: 12 Dec 2021, 20:05

Re: [Queue-Script] FakeDetector - early detection of fake videos

Post by snikay » 04 Jan 2022, 08:40

same here. the script seems broken with newer python versions

Code: Select all

python3 ./FakeDetector.py 
Traceback (most recent call last):
  File "./FakeDetector.py3", line 74, in <module>
    from xmlrpclib_to import ServerProxy
  File "/home/snikay/.local/lib/python3.8/site-packages/xmlrpclib_to/__init__.py", line 9, in <module>
    import httplib
ModuleNotFoundError: No module named 'httplib'

but even with python2

Code: Select all

python2 ./FakeDetector.py
Traceback (most recent call last):
  File "./FakeDetector.py3", line 74, in <module>
    from xmlrpclib_to import ServerProxy
ImportError: No module named xmlrpclib_to

because of things like that, i probably stay with sabnzbd (no matter what advantages nzbget brings to the table) .. most of these 3rd party scripts are already implemented and well maintained
while this outdated nzbget scripts will probably break every automation every here and then. which (automation) is my top priority.

i mean seriously...

fake detector - implemented
password detector - implemented
password extractor - implemented
deobfuscate - implemented
extended unrar - implemented
flatten - implemented
failurelink - implemented
deletesamples - implemented

all of these scripts are core implemented in sabnzbd. and all of these can break nzbget.

i like nzbget, especially calling the scripts one by one and setting them up in UI, but please dev's, add them as 1st party addons

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests