Login Register


Pomf.cat Uploader filter_list
Author
Message
Pomf.cat Uploader #1
I've started to familiarize myself with parts of requests other than just .get() recently. Last night was my first venture into the post method, which is easy as hell to use, as always.
Anyway, a cup of coffee and 20 minutes of screwing with an API later, I made this. There's two versions; one runs as a normal python file, asks for input, etc... The other is one I custom built for my context menu tutorial (link). Enjoy!

Version 1:
Code:
from requests import post r=post( url='https://pomf.cat/upload.php', files={'files[]':open(raw_input('File to upload: '),'rb')} ).text for x in eval(r[0]+r[16:])['files']: print 'https://a.pomf.cat/'+x['url']

Version 2:
Code:
from pyperclip import copy from requests import post from sys import argv r=post( url='https://pomf.cat/upload.php', files={'files[]':open(argv[1],'rb')} ).text for x in eval(r[0]+r[16:])['files']: copy('https://a.pomf.cat/'+x['url'])
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply







Users browsing this thread: 1 Guest(s)