mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.35k stars 925 forks source link

I can't download over a split vpn #4637

Closed pppaapp closed 11 months ago

pppaapp commented 11 months ago

i set up a vpn on my router.

CleanShot 2023-10-08 at 17 28 56

This way, the "kemono.party" domain will be accessed through vpn

CleanShot 2023-10-08 at 17 32 07

this setting is valid in the Chrome browser

CleanShot 2023-10-08 at 17 33 05

but it does not work with gallery-dl

kattjevfel commented 11 months ago

Does it work with other tools like curl etc?

pppaapp commented 11 months ago

Does it work with other tools like curl etc?

I tried curl

CleanShot 2023-10-08 at 23 46 19

No problem

mikf commented 11 months ago

This has to be some issue with requests or urllib3. (possibly due to HTTP_PROXY or other environment variables)

Could you try the following?

python -c 'import requests; print(repr(requests.head("https://c6.kemono.party/data/98/a2/98a2601fa9eb6c057ac2b7b595cb64572d890b8ff4a83dcd03c713dea219481e.jpg")))'
pppaapp commented 11 months ago

This has to be some issue with requests or urllib3. (possibly due to HTTP_PROXY or other environment variables)

Could you try the following?

python -c 'import requests; print(repr(requests.head("https://c6.kemono.party/data/98/a2/98a2601fa9eb6c057ac2b7b595cb64572d890b8ff4a83dcd03c713dea219481e.jpg")))'

CleanShot 2023-10-09 at 23 59 36

<Response [200]>

And this is my JSON

{
    "extractor":
    {
        "base-directory": "/volume3/temp03/TEST",
        "archive": "/volume3/temp03/TEST/test1.sqlite3",

        "postprocessors":
        [
            {
                "name": "ugoira",
                "extension": "gif",
                "ffmpeg-location": "/bin/ffmpeg",
                "ffmpeg-args": ["-filter_complex", "[0:v] split [a][b];[a] palettegen [p];[b][p] paletteuse"]
            }
        ],

        "extension-map": {
            "jpg" : "jpeg",
            "jpe" : "jpeg",
            "jfif": "jpeg",
            "jif" : "jpeg",
            "jfi" : "jpeg"
        },

        "oauth":
        {
            "browser": true,
            "cache": true,
            "port": 6414
        },

        "kemonoparty":
        {
            "image-filter": "extension not in ('psd', 'clip', 'sai')"
        }
    },

    "downloader":
    {
        "filesize-min": null,
        "filesize-max": null,
        "mtime": true,
        "part": true,
        "part-directory": "/volume3/temp03/TEST/.part",
        "progress": 3.0,
        "rate": null,
        "retries": 4,
        "timeout": 30.0,
        "verify": true,

        "http":
        {
            "adjust-extensions": true,
            "headers": null
        }
    },

    "output":
    {
        "mode": "auto",
        "progress": true,
        "shorten": true,
        "skip": true,
        "log": "[{name}][{levelname}] {message}",
        "logfile": null,
        "unsupportedfile": null
    },

    "netrc": false,

    "cache": {
        "file": "/volume3/temp03/TEST/test2.sqlite3"
    }
}
mikf commented 11 months ago

I've just realized that we've only been testing kemono data servers (cN.kemono.party), while the HttpError/ConnectionError exceptions happen one step before that during a request to https://kemono.party/api/….

Could you post the --verbose output for gallery-dl, and maybe retry the previous tests with curl and requests for https://kemono.party/?

And this is my JSON

Nothing in there should be causing any network problems, or be affecting anything network related.

pppaapp commented 11 months ago

ok

CleanShot 2023-10-10 at 07 57 51

[gallery-dl][debug] Version 1.26.0
[gallery-dl][debug] Python 3.8.15 - Linux-3.10.108-x86_64-with-glibc2.34
[gallery-dl][debug] requests 2.31.0 - urllib3 2.0.3
[gallery-dl][debug] Configuration Files ['/volume3/temp03/TEST/test.json']
[gallery-dl][debug] Starting DownloadJob for 'https://kemono.party/fanbox/user/3316400'
[kemonoparty][debug] Using KemonopartyUserExtractor for 'https://kemono.party/fanbox/user/3316400'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): kemono.party:443
[kemonoparty][debug] ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) (1/5)
[kemonoparty][debug] Sleeping 1.00 seconds (retry)
[urllib3.connectionpool][debug] Starting new HTTPS connection (2): kemono.party:443
[kemonoparty][debug] ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) (2/5)
[kemonoparty][debug] Sleeping 2.00 seconds (retry)
[urllib3.connectionpool][debug] Starting new HTTPS connection (3): kemono.party:443
[kemonoparty][debug] ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) (3/5)
[kemonoparty][debug] Sleeping 3.00 seconds (retry)
[urllib3.connectionpool][debug] Starting new HTTPS connection (4): kemono.party:443
[kemonoparty][debug] ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) (4/5)
[kemonoparty][debug] Sleeping 4.00 seconds (retry)
[urllib3.connectionpool][debug] Starting new HTTPS connection (5): kemono.party:443
[kemonoparty][debug] ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) (5/5)
[kemonoparty][error] HttpError: ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
pppaapp commented 11 months ago

Is this a difficult problem to solve?

kattjevfel commented 11 months ago

Did you try

maybe retry the previous tests with curl and requests for https://kemono.party/?

as in, not the subdomains, but rather the domain that gallery-dl is having problems with. I'd say this is a rather important step as if the problem lies with requests, then it isn't gallery-dl's fault.

pppaapp commented 11 months ago

Did you try

maybe retry the previous tests with curl and requests for https://kemono.party/?

as in, not the subdomains, but rather the domain that gallery-dl is having problems with. I'd say this is a rather important step as if the problem lies with requests, then it isn't gallery-dl's fault.

sorry im not sure what you mean

what should i do?

kattjevfel commented 11 months ago

Testing a https://kemono.party/-URL with curl and request, for example: python -c 'import requests; print(repr(requests.head("https://kemono.party/static/ktan.png")))'

(and the same with curl)

pppaapp commented 11 months ago

Testing a https://kemono.party/-URL with curl and request, for example: python -c 'import requests; print(repr(requests.head("https://kemono.party/static/ktan.png")))'

(and the same with curl)

Thank you

I figured out the problem with your advice

I found a problem with my router settings

No problem with gallery-dl😂😂😂😂