PolyEdge / scratchapi

[CURRENTLY UNMAINTAINED] Scratch API Interface
40 stars 15 forks source link

Subclass for getting project/user/studio comment section HTML? #15

Open prail opened 7 years ago

prail commented 7 years ago

Might this be something you would look into? It'd be quite useful for comment bots etc.

PolyEdge commented 7 years ago

I'm not adding anything that involves HTML at the moment, because it requires a dependency to parse it, but if you want to, use the interface. It automatically handles auth and cookies

session.lib.utils.request('/api-name/etc/etc', method='POST', payload='data stuff', server=session.API_SERVER)
prail commented 7 years ago

Ah okay forgot about that whole bit. (Unless you'd like to include your own HTML parser. hint hint)

PolyEdge commented 7 years ago

...

PolyEdge commented 7 years ago

I'll think about it.

joker314 commented 7 years ago

It's quite limited HTML, so I think that it actually can be parsed by a regular expression or something.

An interesting question is whether an image of a sushi should be kept as the HTML image or translated to "_sushi_"

jeandrek commented 7 years ago

Maybe it can but it'd be really complicated and hard to make/update/understand.

prail commented 7 years ago

@joker314 That sounds like an interesting problem... What I'm probably going to end up doing is forking @Gaza101's comment scraper and updating it to python3.

PolyEdge commented 7 years ago

I'm quite busy rn, if somebody wants to make a PR