Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't download anything - somethings changed and im not sure what. #6518

Open
USERNAMETAKENN opened this issue Nov 23, 2024 · 8 comments
Open

Comments

@USERNAMETAKENN
Copy link

USERNAMETAKENN commented Nov 23, 2024

Only been using this app for about 2 weeks now but something has changed. When I input:

gallery-dl -g -u "" -p "" "instagramurl"
it no longer completes or attempts and instead inputs back as a response:
instagramurl/posts/ and does nothing.

I assume gallery-dl is wanting me to correct the URL to include /posts because it assumes im doing something wrong (which is new - normally the base URL worked fine but when I do that starts putting out white text instead of green, is much slower than if I was downloading typically and puts out a bunch of information it looks to be attempting to download but nothing of the gets saved anywhere.

Example of output:
https://instagram.fyyc2-1.fna.fbcdn.net/o1/v/t16/f1/m86/F443F645292CCD4A67377748A4A425AF_video_dashinit.mp4?stp=dst-mp4&efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uY2xpcHMuYzEuNzIwLmJhc2VsaW5lIn0&_nc_cat=101&vs=384752247643048_2349019271&_nc_vs=HBksFQIYUmlnX3hwdl9yZWVsc19wZXJtYW5lbnRfc3JfcHJvZC9GNDQzRjY0NTI5MkNDRDRBNjczNzc3NDhBNEE0MjVBRl92aWRlb19kYXNoaW5pdC5tcDQVAALIAQAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dFRWhGUnMyRGNIb2x0NENBQlB1UFVRdWZWZFVicV9FQUFBRhUCAsgBACgAGAAbABUAACaCo6uAiqPGQRUCKAJDMywXP%2FIAAAAAAAAYEmRhc2hfYmFzZWxpbmVfMV92MREAdf4HAA%3D%3D&_nc_rid=0faaa66101&ccb=9-4&oh=00_AYDp-ByOWc-Wge3B4NbQjpqz4OkdP0xiXYWwd4brLaXAXA&oe=67443225&_nc_sid=b41fef

If I abandon the command it gives me option to resume from current position but nothing is downloading whatsoever but seems to THINK it's downloading something. Obviously I can copy the link and it gets me to what I'm looking for but it's not storing it on my computer in the specified gallery-dl folder - maybe opening/buffering then closes it? I'm confused. This scrape tool has worked on several profiles and only lately has seemed to output a different type of response.

Can anyone assist me on this? I'm very very green to py3 and I apologize for the likely laymam's terms required for me to understand in advance.

@Hrxn
Copy link
Contributor

Hrxn commented Nov 24, 2024

"Base" URL should still work fine...

Can you post the output of gallery-dl -v <URL> <etc> in here?

@USERNAMETAKENN
Copy link
Author

USERNAMETAKENN commented Nov 24, 2024

[gallery-dl][debug] Version 1.27.7 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/linadiaa/'
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/linadiaa/'
[instagram][debug] Using InstagramPostsExtractor for 'https://www.instagram.com/linadiaa/posts/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/web_profile_info/?username=linadiaa HTTP/11" 200 75173
[instagram][debug] Sleeping 7.55 seconds (request)

After that it started firing off downloads with download confirmations like:

[urllib3.connectionpool][debug] https://instagram.fyyc2-1.fna.fbcdn.net:443 "GET /v/t51.29350-15/461486813_549424854430046_163184981009600580_n.jpg?stp=dst-jpg_e35_tt6&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDE3ODAuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=instagram.fyyc2-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=l-jKZhsQJcgQ7kNvgFdBlBL&_nc_gid=e8ae9acb6f744aad8b190a39061d8b70&edm=ABmJApABAAAA&ccb=7-5&ig_cache_key=MzQ2NjYwNzU0NTQ4MzQzNzU5NQ%3D%3D.3-ccb7-5&oh=00_AYAYsp-VtmafyON4DM6L8gaQ_pbF2tMMj8Uj6SFSZ5Si9Q&oe=67487F80&_nc_sid=b41fef HTTP/11" 200 232217
.\gallery-dl\instagram\linadiaa\3466607563812597488_3466607545483437595.jpg

So that -v command kickstarted the download. Curious.

@USERNAMETAKENN
Copy link
Author

Hmmmm strange. I tried it with a login option and it spit out the same thing.

C:>gallery-dl -v -g -u "" -p "" https://www.instagram.com/lia.playtime/
[gallery-dl][debug] Version 1.27.7 - Executable (stable/windows)
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting UrlJob for 'https://www.instagram.com/lia.playtime/'
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/lia.playtime/'
https://www.instagram.com/lia.playtime/posts/

Very strange. Just stops me and outputs a URL correction?

@mikf
Copy link
Owner

mikf commented Nov 24, 2024

-g tells gallery-dl to print URLs instead of downloading. Don't use it if you want to actually download.

Login with -u and -p is not supported for Instagram. You have to pass cookies to "login".

@USERNAMETAKENN
Copy link
Author

Thank you for that clarification mikf. I swear I've been using that command but successfully before - I guess I was mistaken.

I think most of my problems are stemming from login issues via http redirect. I use google chrome and have downloaded the Get cookies.txt LOCALLY extension, tried gallery-dl --clear-cache "instagram" command. Relogged in to instagram, and it keeps with the same redirecting me to login page. Tried toggling the extension on and off. Doesn't seem to make a difference.

@Hrxn
Copy link
Contributor

Hrxn commented Nov 24, 2024

Turning the extension on and off? What?

Click on the extension logo, select the button to export cookies (domain specific is usually enough), save the file somewhere and the reference this file from gallery-dl

@USERNAMETAKENN
Copy link
Author

USERNAMETAKENN commented Nov 24, 2024

Okay. I've attempted to do as such.

Clicked the logo when accessing instagram.com >clicked the extension logo > exported instagram cookies via netscape style - downloaded it as default name www.instagram.com_cookies.txt, put the txt cookies file into the gallery-dl folder - then input:

{
    "extractor": {
        "instagram": {
            "cookies": "C:\gallery-dl\www.instagram.com_cookies.txt"
        }
}

Into Python. Which spit out some syntax of not accepting the format so I copied an example from mikf:

        {
    "extractor": {
        "instagram": {
            "cookies": "C:\gallery-dl\www.instagram.com_cookies.txt"
        },
        "patreon": {
            "cookies": {
                "session_id": "K1T57EKu19TR49C51CDjOJoXNQLF7VbdVOiBrC9ye0a"
            }
        },
        "twitter": {
            "cookies": ["firefox"]
        }
    }
}

Which spat out:
:4: SyntaxWarning: invalid escape sequence '\g' which I dont really understand. If I copy the format with the $home mikf reference instead of my C:\cookies path reference it seems to accept without syntax error. Not sure why I'm getting an error here.

I also tried the same with a .json file with no luck - still requesting I login. I assume I'm doing something terribly wrong.

@mikf
Copy link
Owner

mikf commented Nov 25, 2024

"cookies": "C:\gallery-dl\www.instagram.com_cookies.txt"
...
SyntaxWarning: invalid escape sequence '\g'

Single backslashes \ need to either be doubled \\ or replaced with forward slashes /, as is mentioned here.

    "cookies": "C:\\gallery-dl\\www.instagram.com_cookies.txt"
    "cookies": "C:/gallery-dl/www.instagram.com_cookies.txt"

You could also use the --cookies command-line option, which wouldn't have this backslash problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants