py3-pinterest icon indicating copy to clipboard operation
py3-pinterest copied to clipboard

How to create video pins?

Open jamesnfl opened this issue 3 years ago • 1 comments

Hello,

i have a few video and i want a solution where we can upload those video as video pins. video pins feature is only available for business users.

Is that possible to achieve that?

jamesnfl avatar Jun 25 '21 12:06 jamesnfl

I am also looking for this, is this possible? Image upload works fine, but Video upload fails.

~.virtualenvs\Vidzy-ILdJulPR\lib\site-packages\py3pin\Pinterest.py in upload_pin(self, board_id, image_file, description, link, title, section_id) 462 This method is simmilar to 'pin' except the image for the pin is local file. 463 """ --> 464 image_url = self._upload_image( 465 image_file=image_file).json()['image_url'] 466 return self.pin(board_id=board_id, description=description, image_url=image_url, link=link, title=title,

~.virtualenvs\Vidzy-ILdJulPR\lib\site-packages\py3pin\Pinterest.py in _upload_image(self, image_file) 500 } 501 --> 502 return self.post(url=UPLOAD_IMAGE, data=form_data, headers=headers) 503 504 def delete_pin(self, pin_id):

~.virtualenvs\Vidzy-ILdJulPR\lib\site-packages\py3pin\Pinterest.py in post(self, url, data, files, headers) 114 115 def post(self, url, data=None, files=None, headers=None): --> 116 return self.request('POST', url=url, data=data, files=files, extra_headers=headers) 117 118 def login(self, headless=True, wait_time=15, proxy=None):

~.virtualenvs\Vidzy-ILdJulPR\lib\site-packages\py3pin\Pinterest.py in request(self, method, url, data, files, extra_headers) 106 response = self.http.request( 107 method, url, data=data, headers=headers, files=files, proxies=self.proxies) --> 108 response.raise_for_status() 109 110 return response

~.virtualenvs\Vidzy-ILdJulPR\lib\site-packages\requests\models.py in raise_for_status(self) 951 952 if http_error_msg: --> 953 raise HTTPError(http_error_msg, response=self) 954 955 def close(self):

HTTPError: 400 Client Error: Bad Request for url: https://www.pinterest.com/upload-image/

sanind avatar Sep 29 '21 15:09 sanind