seregazhuk / php-pinterest-bot

This PHP library will help you to work with your Pinterest account without using any API account credentials.
MIT License
416 stars 129 forks source link

http agent doesn't work #387

Closed Dao258 closed 6 years ago

Dao258 commented 6 years ago

http agent doesn't work

when login pinterest account, you will get an email said you have a new login and devices is "PYTHON REQUEST"

seregazhuk commented 6 years ago

Please provide more information, what code are you using, what do you expect and what you actually get.

Dao258 commented 6 years ago

I used two kinds of codes, but got the same result.

The 1st code:

$bot = PinterestBot::create();

// Login
$bot->auth->login('mypinterestlogin', 'mypinterestpassword');`

The 2nd code:
`
$bot = PinterestBot::create();

$bot->getHttpClient()->setOptions([
    CURLOPT_PROXY => 'xx.xx.xxx.xx:xxxx',
    CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
    CURLOPT_USERAGENT => ' Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36',
]);

$bot->auth->login('mypinterestlogin', 'mypinterestpassword');

All got same result for

We noticed a login from a new device or location and want to make sure it’s you. Device: Python Requests Where: California, United States (Approximate)  

seregazhuk commented 6 years ago

CURLOPT_USERAGENT options works, I've just checked on my local server. Your code doesn't prove that specified headers are not being sent to Pinteterest. Everything that your code shows is that you try to login with different headers and Pinterest complains about it.

seregazhuk commented 6 years ago

Closing, it is not an issue