-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facing problem with pinning Image #148
Comments
Same issue. :((((((((((( Yesterday everything worked. :( after now not working after I lost my code yesterday. |
oh no no, it works, the error was in email I didnt wrote @gmail.com |
Is this code really working for you? @umar-farooq-khan |
yes it works. but only sometimes, It started giving error. but again there is always a problem with our code. |
do you have skype or facebook? lets resove the issue together. |
Hey guys, sounds like an interesting investigation. I made some Wireshark recordings some weeks ago while uploading pins with images via website and compared it to what is sent via py3pin. It looked quite different. The website uses HTTP2, the headers are not the same and images are uploaded as a stream. Since HTTP2 requires encrypted communication, I thought this was the reason for the "unauthorized" error. So I thought it would never work without changing the communication layer completely. Actually, I wonder how it can work by changing some text content? Attached, you find my recordings. |
That is some really advanced investigation, I usually just inspect the network tab and repeat the requests in python. Everything seems to be working locally on my machine, looks like for some reason the login fails. Try deleting the cred folder, do login and see if it get populated again |
I have tried a lot of the things that were discussed in all the different conversations of the repositery. I was really hopeless and I found that it was simply due to me living in a non-english country so I just had to change the settings of my pinterest account and put US in country and american english in language. Check this link out : Hope this will help some fellow coders ! |
I am successfully logged in.
Got Board Ids from my profile.
I have access to write and delete rights.
but still having issues like below at upload_pin function.
Successfully logged in with account jhonypinit2@gmail.com
Traceback (most recent call last):
File "c:/Users/useruser/Documents/pyqt5-test/py3pin/main.py", line 19, in
pinterest.upload_pin(board_id='789889359553000095', description='this is auto pin', title='a bot did this',image_file='./1777.jpg', link='https://www.inspiringnorah.com')
File "F:\NetBeansProjects\Instagram\instoo\Python37\lib\site-packages\py3pin\Pinterest.py", line 458, in upload_pin
image_url = self._upload_image(image_file=image_file).json()['image_url']
File "F:\NetBeansProjects\Instagram\instoo\Python37\lib\site-packages\py3pin\Pinterest.py", line 494, in _upload_image
return self.post(url=UPLOAD_IMAGE, data=form_data, headers=headers)
File "F:\NetBeansProjects\Instagram\instoo\Python37\lib\site-packages\py3pin\Pinterest.py", line 115, in post
return self.request('POST', url=url, data=data, files=files, extra_headers=headers)
File "F:\NetBeansProjects\Instagram\instoo\Python37\lib\site-packages\py3pin\Pinterest.py", line 107, in request
response.raise_for_status()
File "F:\NetBeansProjects\Instagram\instoo\Python37\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://www.pinterest.com/upload-image/
The text was updated successfully, but these errors were encountered: