jaymoulin / docker-jdownloader

JDownloader 2 Docker Image (Multiarch) - 50M+ Downloads
https://brands.jaymoulin.me/me/docker-jdownloader
MIT License
182 stars 36 forks source link

Add cracker0dks/CaptchaSolver #125

Closed d3f113 closed 1 year ago

d3f113 commented 1 year ago

Description

It would be great to add the CaptchaSolver, which uses neural networks to solve some standard captchas. Or make it possible to add it somehow manually.

Additional information you deem important (e.g. issue happens only occasionally): GitHub can be found at: https://github.com/cracker0dks/CaptchaSolver There is also an introduction for adding it. In general it is:

The CaptchaSolver can be deactivated by deleting the added folders/files from opt/JDownloader/jd/captcha/methods

jaymoulin commented 1 year ago

TL;DR : This won't be implemented in my version of Docker JDownloader. I suggest people to implement their own Docker image with this addition.

Explanation:

  1. The recent version of CaptchaSolver is not compatible with Linux (https://github.com/cracker0dks/CaptchaSolver/issues/21) due to removed dependency (https://github.com/cracker0dks/CaptchaSolver/commit/4092a2ce348b621a5649535fd08be59935e8fb16#diff-ce1806b27fe3e1f976f7d45b41b17486ffe8f7db288327af81993ba7a6ced1e1). As my docker images are based on Linux, the actual precompiled version could not work until fixed
    1. CaptchaSolver relies on darknet neural network which must be compiled on the architecture. My Docker image exists to be compatible with multiple architectures. Some of those architecture won't have enough resources to perform neural network decypher (such as raspberry pi zero) even if darknet is compiled for those

Therefore, I think it's better that darknet is compiled for your specific needs. The easiest way is to wait for a fixed version of CaptchaSolver which will probably be compiled for amd64, incompatible with arm architectures (initial purpose of this Docker image)

Here is a possible implementation:

FROM jaymoulin/jdownloader

RUN apk add --update git nodejs npm bash && \
    git clone https://github.com/cracker0dks/CaptchaSolver /tmp/captcha && \
    cp -R /tmp/captcha/"JDownloader 2.0"/* /opt/JDownloader/app/ && \
    chmod +x /opt/JDownloader/app/tools/offlineCaptchaSolver/darknet64/darknet && \
    /opt/JDownloader/app/tools/offlineCaptchaSolver/checkdeps.sh && \
    apk del git --purge && \
    rm -rf /tmp/captcha

save as Dockerfile

docker build -t acme/jdownloader .

to execute in your folder where Dockerfile exists, then run container with your acme/jdownloader instead of jaymoulin/jdownloader