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

Not able to retrieve the default 'All Pins' and even private boards #3484

Closed
hellen-dorandt89 opened this issue Dec 31, 2022 · 9 comments
Closed

Comments

@hellen-dorandt89
Copy link

Hello, I have been trying to see if I can retrieve the "All Pins" board for my Pinterest account. I think its a "sectret" board so you cant see it without it logging. I have tried to do so multiple times using the cookies method.
My set up looks like

        "pinterest":
        {
            "cookies": "V:/cookies.txt",
            "sections": true,
            "videos": true
        },

I have two boards on my profile, one called dresses and the other, the default "All Pins board
Every time I run Gallery-Dl [my profile url] It only gets the dresses board.

So as a test I manually set the dresses board to private and now when I run samme command as above, I get:

[pinterest][info] No results for https://www.pinterest.co.uk/myprofile/_saved

I also get the same error when I try gallery-dl.exe https://www.pinterest.co.uk/myprofile/_saved -g

Is my cookies file even working, I have used the cookies method succesfully with instagram. How can I verify the the success of login in vai cookies.txt file? or is this an issue with gallery DL?

Is there a way to retrieve just the url links of every pin and save it the ouput to a .txt file? I think that would simplify things allot. Thanks for any help.

@mikf
Copy link
Owner

mikf commented Jan 1, 2023

To make exported cookies work with Pinterest, you need to ensure their domain is pinterest.com, i.e. you need to replace the cookie domain with .pinterest.com in your cookies.txt file as necessary.

For example, I get cookies for www.pinterest.de when logging in:

# Netscape HTTP Cookie File

www.pinterest.de	FALSE	/	TRUE	1704122842	csrftoken	...
www.pinterest.de	FALSE	/	TRUE	1703690842	_pinterest_sess	...
www.pinterest.de	FALSE	/	TRUE	1703690842	_auth	...
www.pinterest.de	FALSE	/	FALSE	1672673242	_routing_id	...

gallery-dl uses https://www.pinterest.com for all API requests, so these cookies won't get used unless I replace .de with .com.


"All Pins" boards (https://www.pinterest.com/USER/pins/) are not supported yet.

@mikf
Copy link
Owner

mikf commented Jan 3, 2023

Commit 294108c adds support for "All Pins" boards.

Is there a way to retrieve just the url links of every pin and save it the ouput to a .txt file? I think that would simplify things allot. Thanks for any help.

There is, but it won't help if you get "No results for ...".

gallery-dl -g "URL" > links.txt

@mikf mikf closed this as completed Jan 3, 2023
@hellen-dorandt89
Copy link
Author

hellen-dorandt89 commented Jan 3, 2023

Hey, thanks for adding support for "All pins" board. I am trying to get my cookies to work with gallery-dl. I made the changes you suggested to the cookies file, sadly gallery-dl is still unable to retrieve sectret boards:

my cookies file in its unedited state is (just a snippet containing the URLs):

# Netscape HTTP Cookie File

.pinterest.com	TRUE	/	TRUE	
.pinterest.com	TRUE	/	TRUE	
www.pinterest.co.uk	FALSE	/	TRUE	
www.pinterest.co.uk	FALSE	/	TRUE	
www.pinterest.co.uk	FALSE	/	FALSE	
www.pinterest.co.uk	FALSE	/	TRUE	
www.pinterest.co.uk	FALSE	/	TRUE	
www.pinterest.com	FALSE	/	FALSE

I live in the UK, so I figured I should replace co.uk like so:

# Netscape HTTP Cookie File

.pinterest.com	TRUE	/	TRUE	
.pinterest.com	TRUE	/	TRUE	
www.pinterest.com	FALSE	/	TRUE	
www.pinterest.com	FALSE	/	TRUE	
www.pinterest.com	FALSE	/	FALSE	
www.pinterest.com	FALSE	/	TRUE	
www.pinterest.com	FALSE	/	TRUE	
www.pinterest.com	FALSE	/	FALSE

Which I did and my cookies files is refrenced like this:

        "pinterest":
        {
            "cookies": "C:/Users/user1/Documents/Gallery-dl/Pintrest Cookies.txt",
            "sections": true,
            "videos": true
        },

But when I invoke gallery-dl.exe https://www.pinterest.co.uk/profilename -g I get:

[pinterest][info] No results for https://www.pinterest.co.uk/profile

@rautamiekka
Copy link
Contributor

rautamiekka commented Jan 3, 2023

Shouldn't you be on the UK URL to begin with if it matters ? Generally the cookie file shouldn't be manually edited, so gdl should account for the mismatch somehow.

Pintrest Cookies.txt

Is the spelling in the config the same as the file in the folder ?

mikf added a commit that referenced this issue Jan 4, 2023
use input URL domain by default
@hellen-dorandt89
Copy link
Author

Shouldn't you be on the UK URL to begin with if it matters ? Generally the cookie file shouldn't be manually edited, so gdl should account for the mismatch somehow.

Pintrest Cookies.txt

Is the spelling in the config the same as the file in the folder ?

Good Catch, I double checked, yes the names match.

@mikf
Copy link
Owner

mikf commented Jan 5, 2023

Does your config file actually get loaded? You can check by running gallery-dl with -v.

$ gallery-dl -v
[gallery-dl][debug] Version 1.24.3-dev - Git HEAD: 6514828d
[gallery-dl][debug] Python 3.10.9 - Linux-6.1.2-arch1-1-x86_64-with-glibc2.36
[gallery-dl][debug] requests 2.28.1 - urllib3 1.26.12
[gallery-dl][debug] Configuration Files ['${HOME}/.gallery-dl.conf']

With commit 9116398, gdl will use the same domain as your input URL for API requests and cookies, so you can leave your cookies.txt file unmodified when you are also using https://www.pinterest.co.uk URLs.


so gdl should account for the mismatch somehow.

Not always possible. What if there are Pinterest cookies for several TLDs?
I think letting the user control what domain to use is the better(?) and at the very least easier way of handling this.

@hellen-dorandt89
Copy link
Author

Hey, the output I get with -v is:

[gallery-dl][debug] Version 1.24.2 - Executable
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.22621
[gallery-dl][debug] requests 2.28.1 - urllib3 1.26.12
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl.conf']

I again redownloaded the latest executable on github and redownloaded the cookies file as well:

        "pinterest":
        {
            "cookies": "C:/Users/../Documents/Gallery-dl/pin.txt",
            "sections": true,
            "videos": true
        },

When I try to donwload from all pins board:

gallery-dl.exe https://www.pinterest.co.uk/profile/pins/

I get:

[pinterest][error] NotFoundError: Requested board could not be found
NativeCommandExitException: Program "gallery-dl.exe" ended with non-zero exit code: 8.

Also, I also cannot find a board that I manually set "sectret" to, in gallery-dl

I wish, I tried logging in to pinterest.com and generate a cookie from there, but pinterest always redirects me to its uk site :(

@mikf
Copy link
Owner

mikf commented Jan 10, 2023

I again redownloaded the latest executable on github and redownloaded the cookies file as well:

Well, the latest "official" release does not contain the changes from 9116398 or 294108c, so it is obviously not going to work with that. Try one of the executables from https://github.com/mikf/gallery-dl/actions/runs/3867847885.

@hellen-dorandt89
Copy link
Author

Ahhh, am an idiot! I used your link to download the right executable
I can confirm now, that all secret boards are found and the all pins board also downloads too :)

Pardon me for the headache I may have caused, very new to all this Command line stuff.
Thank you.

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