Closed derkleinemukk closed 5 years ago
same here, account seem not blocked, still getting traffic but PHP bot didn't work, maybe an new update from Pinterest?
Same problem here. I can log in the browser with the same credentials used in the bot.
Yes, looks like Pinterest has changed its API 😞
Sergey, Do you think the login issue can be resolved? Similar to other users, my sign in credentials work in the browser.
Do you think the login issue can be resolved?
Not now. Currently, I don't have free time to fix it 😞
Would be happy to help with resolving it, do you already have an idea of what needs to be changed where? Pinterest docs only talk about oAuth with a registered app, so that's not really helpful.
The URL you're using to create the user session https://www.pinterest.co.uk/resource/UserSessionResource/create/ does work in the browser (based on cookies I also get my user info back in the browser, so the endpoint itself is working). Didn't get much further with my digging, but maybe you did?!
any solution ?
any solution ? help!
Didn't get much further with my digging, but maybe you did?!
Yes, I did. And they have changed the whole authentication system. It is not a matter of one request. So feel free to provide PR to fix it.
I am happy to help....., just need a little bit of guidance to get started... Is there anywhere I can see the authentication system? In my use of the bot, I really only require logging in to get pin activity. All other parts of the bot, as far as I can see, work very well.
Didn't get much further with my digging, but maybe you did?!
Yes, I did. And they have changed the whole authentication system. It is not a matter of one request. So feel free to provide PR to fix it.
when I try to use Postman for post request, Pinterest returns always the page "need to activate Javascript".
But in the Cookie we can find "csrftoken"
I am happy to help....., just need a little bit of guidance to get started... Is there anywhere I can see the authentication system? In my use of the bot, I really only require logging in to get pin activity. All other parts of the bot, as far as I can see, work very well.
use chrome extension like Web Sniffer to trace login process and find the variables and the way that use pintreset to login
for debugging the request of this package edit ( C:...\vendor\seregazhuk\pinterest-bot\src\Api\CurlHttpClient.php ) and add before the return line of [function init($url, $postString, $headers)] this lines
curl_setopt($this->curl, CURLOPT_VERBOSE, true); $verbose = fopen('c:\temp.txt', 'a+'); curl_setopt($this->curl, CURLOPT_STDERR, $verbose);
for @seregazhuk
for registration of new account it work and the response of bot->register() give auth=1 but i suggest to save the cookies response _pinterest_sess and csrftoken to autologin (to prevent pinterest ban) at Auth.php `` /**
- @param Registration $registrationForm
@return bool|mixed */ protected function makeRegisterCall(Registration $registrationForm) { if (!$this->sendEmailVerificationAction()) { return false; }
$data = $registrationForm->getData(); $this->request->loadCookiesFor($data['email']); <<< line to add if (!$this->post(UrlBuilder::RESOURCE_CREATE_REGISTER, $registrationForm->toArray())) { return false; } if (!$this->sendRegistrationActions()) { return false; } return $this->completeRegistration(); }
``
- i change also the URL_BASE and HOST at \vendor\seregazhuk\pinterest-bot\src\Helpers\UrlBuilder.php i notice that pinterest not share correctly the cookies between subdomain const URL_BASE = 'https://www.pinterest.com/'; const HOST = 'www.pinterest.com';
- for the login still not working and an alternative and tomporary solution is using bot->register() to login like edited in (1)
this didnt work for me... call $bot->auth->register() function with existing account will return false
Thanks for the guidance @tuxado ... I cannot get $bot->auth->register() to work for an existing account. (1) I don't know if its relevant, but when logging in through Pinterest it sends requests to /_ngjs/resource/ActiveUserResource/create/ (GET) and /_ngjs/resource/StatsLogResource/create/ (POST) and /resource/UserRegisterTrackActionResource/update/ (POST) and /resource/ContextLogResource/create/ (POST)
(2) Current login request ($bot->auth->login()) returns... "resource_response":{"data":null,"error":{"code":"FULL_PAGE_NOT_ALLOWED_BY_ROUTE","target":"None","http_status":404}},
(3) See attached file (curltemp.txt) for Curl verbose log when calling $bot->auth-
login(username_or_or_email,password);
It look like the login rework, if the main package not working use this update https://github.com/tuxado/php-pinterest-bot
I tested to login with the updated package with 5 account :
.
[INFO] Account : patrick.batz.@gmail.com > [INFO] Account login success [Info] sleeping... [INFO] Account : jmills.458@gmail.com > [INFO] Account login success [Info] sleeping... [INFO] Account : stewart.kutch.@gmail.com > [INFO] Account login success [Info] sleeping... [INFO] Account : herminio.marvin@gmail.com > [INFO] Account login success [Info] sleeping... [INFO] Account : fadel.thalia@gmail.com > [INFO] Account login success
but the pinterest ban is without mercy lol can any one suggest me a good and cheap proxy
Error calling seregazhuk\PinterestBot\Api\Providers\User::isBanned method. You must log in before
login fail and return this error plz anyone can help me thanks advance @seregazhuk
also your examples is not working @seregazhuk
@anasnawaz use this package https://github.com/tuxado/php-pinterest-bot download it manually from the browser unzip it and copy and replace the main package on vendor/seregazhuk/php-pinterest
examples
$bot = PinterestBot::create();
$bot->auth->login("example@example.com", "password");
if($bot->auth->isLoggedIn())
{
if (!$bot->user->isBanned())
{
echo ' > [INFO] Account login success';
}
}
bundle of thanks for help
On Tue, 12 Feb 2019 at 21:33, tuxado notifications@github.com wrote:
@anasnawaz https://github.com/anasnawaz use this package https://github.com/tuxado/php-pinterest-bot download it manually from the browser unzip it and copy and replace the main package on vendor/seregazhuk/php-pinterest
' $bot = PinterestBot::create(); $bot->auth->login("example@example.com", "password"); if($bot->auth->isLoggedIn()) { if (!$bot->user->isBanned()) { echo ' > [INFO] Account login success'; } }
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/seregazhuk/php-pinterest-bot/issues/442#issuecomment-462831475, or mute the thread https://github.com/notifications/unsubscribe-auth/AizzzO-AETdf1seC5PxUwnfhPr08C8Prks5vMuy-gaJpZM4afvmK .
Thanks @tuxado The new fork does achieve login and I'm now able to run $bot->pins->activity($pinid,25) ->toArray(); which is login dependent.
Thank you @tuxado
Actually, the issue was only with the domain. You should use www.pinterest.com
instead of country-specific uk.pintrerest.com
🤦♂️
Everybody, I have published a new release v5.9.1
with fixes. Please, update you versions.
Thanks @seregazhuk
@seregazhuk Thanks 👍
when my script loads in the browser there is an error "Sorry! We've had to block actions (logins) from your area because of suspicious activity. Please try again later." How can I handle it?
Thank you @tuxado Actually, the issue was only with the domain. You should use
www.pinterest.com
instead of country-specificuk.pintrerest.com
🤦♂️Everybody, I have published a new release
v5.9.1
with fixes. Please, update you versions.
Hello,
How can I update php-pinterest-bot v5.9.1?
when I run "composer require seregazhuk/pinterest-bot" in cmd, it loads "Installing
seregazhuk/pinterest-bot (5.7.3): Loading from cache"
BR
Thank you @tuxado Actually, the issue was only with the domain. You should use
www.pinterest.com
instead of country-specificuk.pintrerest.com
man_facepalming Everybody, I have published a new releasev5.9.1
with fixes. Please, update you versions.Hello,
How can I update php-pinterest-bot v5.9.1?
when I run "composer require seregazhuk/pinterest-bot" in cmd, it loads "Installing
seregazhuk/pinterest-bot (5.7.3): Loading from cache"
BR
edit your composer.json "seregazhuk/pinterest-bot": "^5.9.1", and open CMD and type : composer update
or use require
composer require vendor/package:version
composer require seregazhuk/pinterest-bot:5.9.1
or
composer require vendor/package "version"
composer require seregazhuk/pinterest-bot "^5.9.1"
started to observe this issue now with v5.9.1 :(
I'm having the same problems again :( Please help @seregazhuk @tuxado
v5.9.1 doesn't work on me either. I keep getting the following error. friends please help me. @seregazhuk @tuxado
... Error calling seregazhuk\PinterestBot\Api\Providers\User::isBanned method. You must log in before. in ...
Thank you @tuxado Actually, the issue was only with the domain. You should use
www.pinterest.com
instead of country-specificuk.pintrerest.com
man_facepalming Everybody, I have published a new releasev5.9.1
with fixes. Please, update you versions.Hello, How can I update php-pinterest-bot v5.9.1? when I run "composer require seregazhuk/pinterest-bot" in cmd, it loads "Installing seregazhuk/pinterest-bot (5.7.3): Loading from cache" BR
edit your composer.json "seregazhuk/pinterest-bot": "^5.9.1", and open CMD and type : composer update
or use require
composer require vendor/package:version
composer require seregazhuk/pinterest-bot:5.9.1
or
composer require vendor/package "version"
composer require seregazhuk/pinterest-bot "^5.9.1"
Iz there any update?
Same as reported by someone else.
Login method doesn't seem to work, error message when calling the isBanned method. Fatal error: Uncaught seregazhuk\PinterestBot\Exceptions\AuthRequired: Error calling seregazhuk\PinterestBot\Api\Providers\User::isBanned method. You must log in before
Tried: var_dump($bot->getLastError()); output NULL
Tried the credentials in the browser, working fine there. Account not blocked etc.