/halp/ - LynxChan technical assistance

General support

Mode: Reply

Max message length: 4096


Max file size: 1.00 MB

Max files: 3


(used to delete files and postings)


Remember to follow the rules

Posting from a script Anonymous 07/01/2019 (Mon) 20:48:37 No. 850
How to use a python script to post on Lynxchan?
Standard http requests.
I'm posting this data:

data = {'action': '/replyThread.js', 'boardUri': 'int', 'threadId': '3655179', 'message': 'BUMP#1001', 'subject': ''}

with this header:

header = {'Content-Type': 'form-data'}

At this url:

r = session.post("https://kohlchan.net/" + "replyThread.js?json=1", headers = headers, data = data)

I get code 200 (ok) but it doesn't display the post in this thread.

Yea, thanks for the effort.
Try to add files = data for post()
Thank you very much, it helped a lot!
But then, what to do to upload files, please?
data = {'boardUri': board, 'threadId': threadId, 'message': message, 'subject': subject, 'sage': sage, 'spoiler': spoiler}

data['file_0'] = open("C:\\Users\\MRX\\Documents\\py_scripts\\pics\\prog\\meme\\that_hacker_feel.png", 'rb')

and then

r = requests.post(website + "replyThread.js?json=1", data = data, files = data)

doesn't seem to work for instance
I haven't succeeded after a good amount of tests:

#image = {'fileMd5': fileMd5, 'fileMime':'image/png', 'fileSpoiler':"", 'fileName':'that_hacker_feel.png', 'files': ['filename="that_hacker_feel.png"', file_0]}
#image = {'files': ["that_hacker_feel.png", file_0, 'image/png']}
#image = {'files': ["that_hacker_feel.png", file_0, 'image/png', {'fileMd5': fileMd5, 'fileMime':'image/png', 'fileSpoiler':"", 'fileName':'that_hacker_feel.png'}]}
#image = {'files': ["that_hacker_feel.png", file_0, 'image/png', {'fileSpoiler':""}]}
image = {'files': ["that_hacker_feel.png", file_0]}
(16.55 KB 480x270 Konata-izumi-smug.jpg)
(114.78 KB 372x350 smug.png)
>data['file_0'] = open("C:\\Users\\MRX\\Documents\\py_scripts\\pics\\prog\\meme\\that_hacker_feel.png", 'rb')
Jolly gee, I wonder why you can't figure somehing basic like this out.
haha linux is an OS fro good programmers.
Oh wow.
Great joge.
Not necessarily, it's just that people who are bad with cumpootah uses windows.
Just post the solution to file upload already if you are so good.
(201.25 KB 516x526 cd0.jpg)
Come funpost at https://spacechan.xyz/b/
I am not shitting you, just look at the posting forms. It's extremely basic.
no thx
from the posting form, I get it's about the name "files".
Then it may be an array of files, not sure what's going on exactly, I try a combination of those. >>886


Captcha (required for reports and bans by board staff)

no cookies?