python脚本的repin函数不起作用

2024-06-01 12:07:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我是python方面的新手,还在学习,我正在尝试在Github上制作一个脚本,用于在Pinterest上执行某些任务,我只对在我的板上复制其他人的pin感兴趣,我已经尝试了一个多星期,没有任何结果,也许有人愿意在这方面帮助我。 我真的很感激。 Here is the source file link on Github

这是重新规划代码的一部分:

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

我制作了一个文件,上面有:

    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)

我没有得到任何结果,也没有得到任何错误。 我感谢你的帮助,非常感谢


Tags: importgithubboardnoneidreturnheremy
1条回答
网友
1楼 · 发布于 2024-06-01 12:07:34

试试看:

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()

我得到的唯一错误是登录错误,因为凭据无效

旁注:ID是占位符,随机的。

相关问题 更多 >