Code Monkey home page Code Monkey logo

Comments (10)

bstoilov avatar bstoilov commented on June 6, 2024 1

The PR was merged if you still have any issues feel free to log a bug :)

from py3-pinterest.

bstoilov avatar bstoilov commented on June 6, 2024

Hi I never explored this feature, I just noticed that there is such thing.

Can you elaborate more on the exact functionalities you would expect for the client to support, like create section, delete section etc.

Thanks

from py3-pinterest.

KristyAnon avatar KristyAnon commented on June 6, 2024

Hi,
I would like to create a section, get the sections from a board, and also get the files from a section.
If you are able to make it, it would be great.
Thanks a lot!
Kristy

from py3-pinterest.

bstoilov avatar bstoilov commented on June 6, 2024

Hi Kristy,
the following PR: #20
adds support for board sections, alongside several other fixes and refactorings.

Feel free to check it out and see if there is any missing functionality or issues, I will merge it in 3 days if everything is ok.

from py3-pinterest.

KristyAnon avatar KristyAnon commented on June 6, 2024

Hi,
Great work!! it seems to be working, I was able to get all the sections from a board, and also I was able to create a new section.
But, I was not able to get the list of pins from a section, is it possible?
Thanks,
Kristy

from py3-pinterest.

bstoilov avatar bstoilov commented on June 6, 2024

The get_boards function response contains this data.

I didn't have to.change anything there, just wasn't aware of these sections

from py3-pinterest.

KristyAnon avatar KristyAnon commented on June 6, 2024

with the get_boards I'm able to access to the list of sections, without issues.
Then, is it possible to get the list of pins for a section? or at least the section name on a pin? I checked and I don't think it is there.

from py3-pinterest.

bstoilov avatar bstoilov commented on June 6, 2024

Hi sorry you are right, to get the pins from a section you need to call
pinterest.get_board_sections(board_id=board_id)
in the response there is preview_pins array, but it seems it is limited to 10 pins.

I missed that limitation when testing, it seems there is separate endpoint which should be called to retrieve all pins from a section, I will add that and let you know.

Thanks

from py3-pinterest.

bstoilov avatar bstoilov commented on June 6, 2024

One more thing, the load_pin function response has information about the section, but it seems there is some change in the pinterest API and it is now broken, but it is a small change.
But I think calling the load_pin endpoint for each pin is a bit of a overkill and you might even get suspended.

I will work on resolving these

from py3-pinterest.

bstoilov avatar bstoilov commented on June 6, 2024

Hey, I was not able to find a "clean" way to retrieve the section feed. so I ended up parsing the whole html page.

So for example if I want to list pins from my section 'heels':
https://www.pinterest.com/cocococoho/s-h-o-e-s/heels/

I can now do it like this:

username = 'cocococoho'
board_name = 's-h-o-e-s'
section_name = 'heels'
data = pinterest.get_section_pins(username=username, board_name=board_name, section_name=section_name)

This can load any section in fact. If you see a way to improve this just let me know, or even better create a PR :)

from py3-pinterest.

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.