Search code examples
pythonpinterest

repin function of a python script won't work


I am a newbie regarding python, and still learning, I am trying to make a script that is on Github works as stated to do some task on Pinterest, I am only interested in Repin other people's pin to my board, I have been trying it for over a week on without any result, Perhaps some people are willing to help me out on this. I am really grateful. Here is the source file link on Github

this is part of the code for repinning:

 def repin(pin_id='', board_id='', section_id=None): return pinterest.repin(board_id=board_id,
  pin_id=pin_id, section_id=section_id)

I have made a file and have these on it:

    import json
    import time
    import os
    from py3pin.Pinterest import Pinterest
    pinterest = Pinterest(email='my acc email',
    password='my acc pass',
    username='my acc username',
    cred_root='cred_root')
    def repin(pin_id='I put other's people pin no Here', board_id='I put one of my board id number 
    Here', section_id=None):
    return pinterest.repin(board_id=board_id, pin_id=pin_id, section_id=section_id)

I don't get any results and don't get any error either. I appreciate your help, thanks a lot.


Solution

  • Try:

    import json
    import time
    import os
    from py3pin.Pinterest import Pinterest
    pinterest = Pinterest(email='my acc email',
    password='my acc pass',
    username='my acc username',
    cred_root='cred_root')
    pinterest.login()
    def repin(pin_id="403212972893719260",board_id="403213041577459796"):
      pinterest.repin(board_id=board_id,pin_id=pin_id)
    
    repin()
    

    The only error I got was a login error because the credentials are invalid.

    Side Note: The ids are placeholders, random.