making a post through a client · 2018-03-10 17:11
Is it reasonably straightforward? I'm trying to write a CLI client for lainchan and I want to know whether I should scrap the idea before I put too much work into it.
Unnamed · 2018-03-10 18:03
There's a JSON API to read the site and posting simply requires mimicking the post form, including hidden fields.
So, no, it should be relatively straightforward if you at all know what you're doing.
Nobody special · 2018-03-11 02:58
>>5360
In lainchan's source code there's a file called anti_bot.php or something. Do I need to deal with that in any way?
There also seem to be a lot of hidden fields with random names.
Joe Bloggs · 2018-03-11 10:10
>>5361
>>5360
Ok so I did a bit of poking around and it seems like if those random strings are omitted, lainchan thinks it's a bot. Oh well, it'll be read only.
Koos van der Merwe · 2018-03-21 21:17
>>5363
I'm actually rather interested in this. Would you mind sharing what you have? I've been actually thinking about looking into a client like that as well, (also for other chans). I know dashchan for android allows posting, so its definitely do-able.
Sipho Nkosi · 2018-03-22 04:33
I have been using an android client to post in this chan there must be a way to do it OP
Mario Rossi · 2018-04-01 06:23
I'd say go ahead. Browsing via CLI is pretty comfy.
Miho Iwakura · 2018-04-01 11:12
>>5363
>>5386
>>5387
You need to read the tokens from the page. So in order to post in this thread you first need to send a get request to https://lainchan.org/q/res/5359.html then scrape it for the tokens which you send along with the post request to post.php.
Aristóteles Amadópulus · 2018-04-07 07:41
>>5406
Can you post the source? :o
Hacker · 2018-04-07 22:40
>>5423
There was a bit of drama when I did so on a different image board because I didn't fully scrub my username from my project. I decided that I was just going to keep it on the down low for a couple months until everyone forgets. Sorry, but I still need to wait a little bit longer before I can release it.