Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Save the contents of a Pinterest board to Paprika 3 recipe manager

Notifications You must be signed in to change notification settings

maradude/pinteresttopaprika

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pinteresttopaprika

Overview

The script works as an adapter en Pinterest and parika 3 recipe manager. It requires some setup but will emulate the action of using the paprika 3 bookmarklet on an entire pinterest board.

The script uses the url for a public pinterest board to call the Pinterest API to gather all te links found in the board. The links are then opened inside a headless chrome instance using 'puppeteer'. For each link the paprika bookmarklet is used. If any link fails they are retried once after the who initial list has been run through. At the end any failures are printed.

On first run the bookmarklet will create an config.toml file if one doesn't already exist in the directory. After this has been filled with the correct infromation, the application will run and if you don't have a 'cookies.txt', the script will login to Pinterest and save the cookies in a new 'cookies.txt' file in the current directory. In future login to Pinterest in not required.

NOTE: The script is slow and processing each link can take a few seconds or even up to a minute or two. So larger boards can take a while to process

Below is what your config.toml should look like with, 'XXX's should be replaced with apropriate codes

[Pinterest]
PinterestUser = "your login name"
PinterestPassword = "passoword"
[Paprika]
PaprikaBookmarkletToken = "XXXXXXXXXXXXXXXX"
PaprikaUser = "your login name"
PaprikaPassword = "password"
[Dev]
PinterestAppID = "XXXXXXXXXXXXXXXXXXX"
PinterestAppSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
PinterestToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Instructions for codes

Know problems

  • Currently there 'cookies.txt' will be assumed to have active pinterest credentials, if there are any issues with all links grabbed from board failing and 404'ing then this is likely due to wrong or outdated cookies. Please delete the file.
  • Opening each page in a chromium instance may not be the most efficient way of adding links to paprika. Will look into it.
  • Some failed links may actually be possible to manually add to paprika with the bookrmarklet, but failed due to the script not accepting possible gdpr prompts
    • Further note, due try to add the links manually using the apps own interface.
  • The script has some waits and timeouts that might benefit from lowering their values, the machine I wrote this in is 10 years old and having larger waits seemed beneficial.

About

Save the contents of a Pinterest board to Paprika 3 recipe manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published