GithubHelp home page GithubHelp logo

Comments (9)

seregazhuk avatar seregazhuk commented on July 25, 2024

Hi, @huuvu1109
What type of proxy is it? HTTP or SOCKS?
It seems like an empty response from the server, and library expects an array. I'll fix this issue with failing on empty responses, but it is not related with proxy. Maybe you miss some options? For example:

$bot->getHttpClient()->setOptions([
    CURLOPT_PROXY => $proxy,
    CURLOPT_PROXYTYPE => CURLPROXY_HTTP // or CURLPROXY_SOCKS5
]);

from php-pinterest-bot.

peterqtr11 avatar peterqtr11 commented on July 25, 2024

Yes, I add CURLOPT_PROXYTYPE option and it works. But if I add wrong option between CURLPROXY_HTTP and CURLPROXY_SOCKS5, the program stops because

"Catchable fatal error:. Argument 2 passed to seregazhuk\PinterestBot\Api\Response
::getValueByKey() must be of the type array, null given, .....|

I have tried to put it in try{} catch{} but that error still occur and stop the program. Can you change that? I mean if not successful, it throw an exception and I can handle base on the exception (e.g ignore in this case)

from php-pinterest-bot.

seregazhuk avatar seregazhuk commented on July 25, 2024

Fixed. Now it will return an empty response if request failed.

from php-pinterest-bot.

peterqtr11 avatar peterqtr11 commented on July 25, 2024

Hi @seregazhuk ,

It works now. Thanks!

from php-pinterest-bot.

peterqtr11 avatar peterqtr11 commented on July 25, 2024

Hi @seregazhuk ,

When we open a Pin, Pinterest, beside Like, Pinterest also have one more option is Tried it like the following Figure, is there any way to do it with the bot in the current version?

image

from php-pinterest-bot.

seregazhuk avatar seregazhuk commented on July 25, 2024

Hi, @huuvu1109 it is not yet available. I think next week will be a new release with this feature.

from php-pinterest-bot.

peterqtr11 avatar peterqtr11 commented on July 25, 2024

Hi @seregazhuk ,

Thanks for your quick response. Can I ask one more question. You see, the same pin can be accessed by 2 URL:

+https://www.pinterest.com/pin/AWh38bJ4p7cCTufggo798KTQlt_fxTQ52PkiqfmrDhASkX8_Dabj3NihElPIaOIFAU4yHQSPy9NeOdqTqeGayNo/
+https://www.pinterest.com/pin/311029918005931968/

When we get pinInfo, we get the string AWh38bJ4p7cCTufggo798KTQlt_fxTQ52PkiqfmrDhASkX8_Dabj3NihElPIaOIFAU4yHQSPy9NeOdqTqeGayNo . Do you know how to translate this tring to the real pin id. Thanks!

from php-pinterest-bot.

seregazhuk avatar seregazhuk commented on July 25, 2024

Have no idea. But you can use this hash as a pin id, why do you need exactly a real pin id?

from php-pinterest-bot.

seregazhuk avatar seregazhuk commented on July 25, 2024

@huuvu1109 I've just published a new release (5.4.4) and it has try it functionality. Check the docs for examples.

from php-pinterest-bot.

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.