[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Where's the 4chan image download script for linux? That

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 2

File: pepe wizard.jpg (25KB, 499x499px) Image search: [Google]
pepe wizard.jpg
25KB, 499x499px
Where's the 4chan image download script for linux? That piece of shit on github doesn't work past 10 images.

I need it fast
>>
>>58704496
this is the one that shits itself

https://github.com/Exceen/4chan-downloader
>>
>>58704496
>/g/ can't even make an image download script
>>
>>58704496
bump
>>
File: 1464021102430.jpg (54KB, 480x640px) Image search: [Google]
1464021102430.jpg
54KB, 480x640px
>>58704496
I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called "Linux", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called "Linux" distributions are really distributions of GNU/Linux.
>>
>can't even make an image downloading script
>frogposter
>making a whole thread for this
get out of my board
>>
>>58704496
I've written this sometime ago. I don't know if it still works, but whatever.
import re
import argparse
import sys
import requests
import os.path

GET_JSON_OBJECT_URL = "http://a.4cdn.org/{}/thread/{}.json"
GET_IMAGE_URL = "http://i.4cdn.org/{}/{}{}"

parser = argparse.ArgumentParser()
parser.add_argument("thread_link", help="a link to the thread", type=str)
parser.add_argument("-o", "--output-directory", help="where to put the pictures", type=str, default=".")
parser.add_argument("--store-filename", help="stores images with the original filename", action="store_true")
args = parser.parse_args()

print("Thread link: {}".format(args.thread_link))

m = re.match("^.*?[.]?4chan.org/(?P<board>.+)/thread/(?P<thread>[^#]+)", args.thread_link)
if m == None:
print("ERROR: Invalid thread link, exiting...")
sys.exit(1)

board = m.group("board")
thread = m.group("thread")

r = requests.get(GET_JSON_OBJECT_URL.format(board, thread))
data = r.json()
i = 1;
for post in data["posts"]:
if "filename" not in post and "ext" not in post:
continue

if args.store_filename:
filename = "{}{}".format(post["filename"], post["ext"])
else:
filename = "{}{}".format(post["tim"], post["ext"])

print("Downloading {} ({}/{})".format(filename, i, len(data["posts"])))

image = requests.get(GET_IMAGE_URL.format(board, post["tim"], post["ext"]))

f = open(os.path.join(args.output_directory, filename), "wb")
f.write(image.content)
i += 1
>>
>>58705102
No, Richard, it's 'Linux', not 'GNU/Linux'. The most important contributions that the FSF made to Linux were the creation of the GPL and the GCC compiler. Those are fine and inspired products. GCC is a monumental achievement and has earned you, RMS, and the Free Software Foundation countless kudos and much appreciation.
Thread posts: 8
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.