Code Monkey home page Code Monkey logo

Comments (7)

bstoilov avatar bstoilov commented on May 27, 2024

Can you post your code?

PS: Repinning that often will get you account suspended.

from py3-pinterest.

zivlakmilos avatar zivlakmilos commented on May 27, 2024

I surround uploadin_pin call with try catch and now I getting following error.
HTTPSConnectionPool(host='www.pinterest.com', port=443): Read timed out. (read timeout=None)

Now I try to upload one image every couple of minute, and every second or third time I getting timeout error.
I call auth once at script start, and later call upload method of class Uplaoder every couple of minutes.

`
class Uploader:
def init(self):
self._pinterest = None

def auth(self, email, password, username):
    self._pinterest = Pinterest(email = email, password = password, username = username, cred_root = './config')
    try:
        user_profile = self._pinterest.get_user_overview()
    except HTTPError as e:
        self._pinterest.login()
        try:
            user_profile = self._pinterest.get_user_overview()
        except HTTPError as ex:
            print(ex)

def uploadImage(self, boardId, image):
    try:
        pinResponse = self._pinterest.upload_pin(board_id = boardId,
                                                 section_id = None,
                                                 image_file = image.getFilePath(),
                                                 description = image.getDescription(),
                                                 title = image.getTitle(),
                                                 link = image.getLink())
        print(pinResponse)

        return True
    except ReadTimeout as e:
        print(e)
    except HTTPError as e:
        print(e)

    return False

def getBoards(self, username):
    return self._pinterest.boards(username = username)

`

from py3-pinterest.

traint avatar traint commented on May 27, 2024

A similar problem. At first everything works fine, but then the pins stop being created
Here is the piece of code responsible for this

i = 1
while i < len(link_list):
    link = link_list[i]
    image = image_list[i]
    title = title_list[i]
    print(link, image, title, sep=' ')
    try:
        pin = pinterest.pin(
                            board_id= board,
                            image_url = image,
                            description = title,
                            title = title,
                            link = link)
        print('COOL!!')
    except:
        print('FOO!!')
        pass
    i += 1
    time.sleep(randint(60,120))

from py3-pinterest.

bstoilov avatar bstoilov commented on May 27, 2024

Are you by any change using proxies?

from py3-pinterest.

traint avatar traint commented on May 27, 2024

No, I don't use proxies

from py3-pinterest.

zivlakmilos avatar zivlakmilos commented on May 27, 2024

No. Me nether.

from py3-pinterest.

bstoilov avatar bstoilov commented on May 27, 2024

To me it seems, these are random outages by Pinterest, it could be also you had pinned too much and they have some sort of protection. Try to stay below 50-60 pins a day per account. And max 5 accounts per IP. That should be safe enough.
Also keep in mind that new and small accounts are more likely to be locked, once the account get around 10k followers and its 6+ months older it will be less likely to get locked

from py3-pinterest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.