docker-jdownloader-2 icon indicating copy to clipboard operation
docker-jdownloader-2 copied to clipboard

Internet browser for JDownloader

Open clx81 opened this issue 6 years ago • 36 comments

Hello, To solve some captcha, JD needs access to a web browser, ie. Turbobit. It shoud'be nice to integrate a light browser inside the container. I will try to do it. Many thanks for your nice work. Paul

clx81 avatar Aug 20 '17 15:08 clx81

Thanks for the suggestion. I will look at this!

jlesage avatar Aug 21 '17 09:08 jlesage

Just for debugging: For most captchas the integrated phantomjs should do the work.

If I remember correctly, a real browser is only needed for exotic captchas, or if something goes wrong. Would be a good fallback, though!

rix1337 avatar Aug 21 '17 09:08 rix1337

Do you have any example of a download link that would require a real browser?

jlesage avatar Aug 21 '17 09:08 jlesage

Not anymore, sadly. @clx81 since you brought it up: any example?

rix1337 avatar Aug 21 '17 09:08 rix1337

For reference, this link has more information about captchas that need browser: https://support.jdownloader.org/Knowledgebase/Article/View/42/14/jd-opens-my-browser-to-display-captchas

jlesage avatar Aug 21 '17 09:08 jlesage

Hello Jocelyn, This link need browser : http://turbobit.net/ozmzsk9hxi2c.html

clx81 avatar Aug 21 '17 12:08 clx81

To add further, some settings might need tweaking:

In the advanced settings:

GeneralSettings: Browser Command Line CommandLine to open a link in a browser. Use %s as wildcard for the url

is currently set to ["/usr/bin/firefox","%s"] on my setup.

Then, there is: BrowserCaptchaSolver: Browser Commandline Example: [ "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "-app=%s" ] also set to ["/usr/bin/firefox","%s"]

No idea, if firefox is the way to go here? There seems to be a chromium package for alpine!

rix1337 avatar Aug 21 '17 13:08 rix1337

In this scenario, a full web browser is not required... Ideally, I would like to find and use a light-weight browser that support the captchas. A browser like firefox or chromium would double (if not more) the size of the container image!

jlesage avatar Aug 21 '17 17:08 jlesage

There is Dillo running on Alpine, but I don't know if it can do the job !

clx81 avatar Aug 21 '17 18:08 clx81

Tried, but doesn't properly display captchas (at least the SweetCaptcha one).

jlesage avatar Aug 21 '17 19:08 jlesage

I agree that Firefox will increase the container image but if you run JD2 for a few days with some downloads the memory size increased up to 900 Mb. We see that also when running it out of docker (verified on Debian 8)

clx81 avatar Aug 22 '17 21:08 clx81

You talk about the RAM or disk space?

jlesage avatar Aug 22 '17 21:08 jlesage

I talk about the RAM, I think that JD2 don't flush the RAM until reboot.

clx81 avatar Aug 22 '17 21:08 clx81

Please support built-in browser, otherwise it can not pass captcha. At present, you can use the Android client, the normal input captcha. But that's not the perfect way.

mapleshadow avatar Oct 29 '17 10:10 mapleshadow

My setup is highly automated and can even solve recaptcha v2 with the integrated shadowjs. Am using 9kw.eu for this. This is working fine as-is. No browser required...

rix1337 avatar Oct 29 '17 10:10 rix1337

@rix1337 Thank you very much.

mapleshadow avatar Oct 29 '17 11:10 mapleshadow

@jlesage Thank you for the frequent updates!

rix1337 avatar Nov 07 '17 11:11 rix1337

Hello, it is possible to implement a firefox inside container? I tried it without any success. Thanks a lot

grundscm avatar Apr 18 '18 09:04 grundscm

You can install it by executing add-pkg firefox-esr in the container. But like others said a web browser should not be required.

jlesage avatar Apr 23 '18 09:04 jlesage

Hello jlesage, thank you for your support. If i use the jdownloader with firefox the container always crash at a link paste. I use these settings in the jdownloader. GeneralSettings: Browser Command Line -> ["/usr/bin/firefox","%s"] BrowserCaptchaSolver: Browser Commandline -> ["/usr/bin/firefox","%s"]

I know the solution without any browser from "rix1337" works well.
I think my idea is an all in one isolated container.

BR

grundscm avatar Apr 23 '18 11:04 grundscm

I remember having similar issue when I evaluated the possibility of integrating a browser. I think there is some incompatibility between JDownloader, which needs glibc, and Firefox, which is compiled with musl.

jlesage avatar Apr 24 '18 09:04 jlesage

another info: if you dont want to user solver services (9kw, etc.) you can enable "solve by app/myjdownloader".

This works for all captcha types and does not require a browser aswell.

You just need a phone or desktop browser at hand when a captcha appears.

rix1337 avatar Apr 24 '18 09:04 rix1337

@rix1337 Thanks for the additional info! Maybe there is another browser easier to implement in the container? I think "Copy/Paste"(mobile phone use) would be easier if i have both in one container.

grundscm avatar Apr 24 '18 10:04 grundscm

none that I know of.. maybe try the captcha through myjdownloader option for now.

rix1337 avatar Apr 24 '18 10:04 rix1337

You have PhantomJs Question: can not directly paste a link, we must go through the clipboard button at the top right ?

Hi @jlesage i writed a dockercompose here using your docker image behind an proxy (traefik) and added Minio for access to downloaded files

diyfr avatar May 04 '18 15:05 diyfr

The standard firefox in this docker is version 47, but the jdownloader captcha addon requires 48

Draic avatar Aug 21 '18 18:08 Draic

Sorry what do you mean exactly? Firefox is not part of the container image...

jlesage avatar Aug 22 '18 14:08 jlesage

oh my fault, sorry. This is the wrong docker :D. mixed two nearly identical ones. ignore me

Draic avatar Aug 22 '18 14:08 Draic

Hi @jlesage I have tried installing firefox-esr package on the image but its working strangely. If i log into the shell and run firefox command i get firefox window on my browser and the browsing works without any issue. But if try to open firefox clicking any link on jdownloader different kind of error arises.

Example error 1: [Parent 6507] WARNING: pipe error (38): Connection reset by peer: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.9.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322

Example error 2:

Gdk-Message: 18:44:46.182: firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

[Child 5799] ###!!! ABORT: Aborting on channel error.: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.9.0esr/ip.cpp, line 2152
[Child 5799] ###!!! ABORT: Aborting on channel error.: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.9.0esr/ip.cpp, line 2152

I am not sure whats going on here. I think it will be really helpful if you can add a seperate image with firefox for those who don't care about the image size.

Thanks.

SubrataM3 avatar Dec 30 '18 19:12 SubrataM3

Try to create the container with the following parameter: --shm-size 2g This is usually required to properly runs firefox.

jlesage avatar Jan 08 '19 10:01 jlesage

i had profile permission issues or SSL issues with Firefox, Dillo and Midori. Chromium worked for me. In Advanced Settings i put:

GeneralSettings: Browser Command Line -> ["/usr/bin/chromium-browser", "--no-sandbox", "%s"]
BrowserCaptchaSolver: Browser Commandline -> ["/usr/bin/chromium-browser", "--no-sandbox", "%s"]

calvinbui avatar Jun 29 '19 06:06 calvinbui

I am running into a similar issue regarding browsers when trying to use my real-debrid account. It creates a popup for Oauth which won't open anything for the obvious reasons. Is there a workaround for this?

Screen Shot 2020-05-06 at 11 18 11 AM

drod3763 avatar May 06 '20 15:05 drod3763

Any updates or workarounds to this issue? I can't get realdebrid to authenticate because I keep getting an oauth error

trulow avatar May 03 '21 10:05 trulow

Any updates or workarounds to this issue? I can't get realdebrid to authenticate because I keep getting an oauth error

I spend some time to finalize it so here are my steps:

I created simple docker file like that:

FROM jlesage/jdownloader-2

RUN apk add chromium

That's all for the installation itself.

For configuration is had to tweak a few thinks.

I had to define the container_name in docker compose file to avoid report of locked profile. To avoid chromium crashes i add shm_size: 2gb as proposed @jlesage.

Then in the `Advanced Settings i changed configuration according to @calvinbui post. (not sure what is doing the --no-sandbox, it's reported by current versions of chromium, but it's still working).

As well i install the extension to chromium after the fist run. The chromium profile stays is the mounted folder so it is necessary to do it only once.

After this change the size of the docker image has changed from 224MB to 501MB but solving captcha in browser is working.

Hope this brief description will help.

UPDATE:

Here is my complete docker-compose.yml file. pad/jd2:current is my name of image generated by docker file for the step 1.

version: '3'
services:
  jd2:
    image: pad/jd2:current
    container_name: jd2
    ports:
      - "5800:5800"
      - "5900:5900"
    volumes:
      - "/docker/appdata/jd2:/config:rw"
      - "/docker/data/jd2:/output:rw"
    environment:
      KEEP_APP_RUNNING: 1
    shm_size: 2gb
    restart: unless-stopped

PavelD avatar May 07 '21 13:05 PavelD

For anyone who is also looking to add real debrid to their installation but can't due to the issues with oauth. I was able to solve it by using this method provided by jdownloader

How to copy your account settings into a headless JD installation: 1. Add all of your desired accounts to a JD installation with GUI (alternatively, copy the account database from your headless installation into your GUI installation, see steps below). 2. Define your desired account settings. 3. Close your headless JDownloader. 4. Copy your account database from [Your GUI-JD install dir]/cfg/org.jdownloader.settings.AccountSettings.accounts.ejs to your headless installation. ⁃ Click on Help>About>Installation Directory to find your install directory Your Account settings should now be applied to your headless installation.

https://support.jdownloader.org/Knowledgebase/Article/View/headless-settings

In my case, I copied the org.jdownloader.settings.AccountSettings.accounts.ejs file to the config/cfg which was defined in the docker run command via "-v /home/USER/jd/config/:/config:rw "

trulow avatar May 10 '21 21:05 trulow

Accounts can also be added via MyJDownloader (https://my.jdownloader.org). So this is probably the easiest way to add a read-debrid account.

jlesage avatar May 17 '21 22:05 jlesage