[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]

>not mass downloading 4chan images

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: 86
Thread images: 11

File: o1Cm6tF.png (64KB, 585x389px) Image search: [Google]
o1Cm6tF.png
64KB, 585x389px
>not mass downloading 4chan images
>>
Post the script. I've always wanted to build an archive
>>
>accidentally downloading the donut man
>>
>>56443100
The question is, why would I want to do that?
>>
I've done this before. It's a massive time sink.
>>
>>56443100
>images
I download archives of the whole site, I wrote a custom scraper for it that uses the api to collect boards and thread id's and then I scrape everything
>>
>>56443147
What kind of storage setup do you have?35
>>
>officer I swear I didn't know !
>>
>accidentally download Certain Pictures
>visit from the party van
>>
>>56443147
Do you have any semblance of a life?
>>
Source?
>>
>>56443168
>>56443263
the data is analysed and scrapped afterwards
>>
Why would I want to save every image on here?
>>
File: archive.png (262KB, 873x633px) Image search: [Google]
archive.png
262KB, 873x633px
>>56443100
But I am.
>>
>>56443100
OP can you share the scrip so others can use.
>>
>>56443100
>>56444653
>>>/v/
>>
im not a pedo to spend time hunting for random images.
i use thread-archiver to download specific threads i like like this guy. >>56444653
>>
>>56444653

post the script please
>>
>>56446549
lol so needy, jesus.
>>
https://github.com/bibanon/BASC-Archiver

Not OP, but I've heard of this one.
>>
>>56443100
What if you save see pee by accident?

n-not FBI here
>>
>>56443381
>the data is analysed

Is what way?
>>
File: Screenshot_2016-09-06-00-14-45.png (274KB, 1080x1920px) Image search: [Google]
Screenshot_2016-09-06-00-14-45.png
274KB, 1080x1920px
>not mass downloading 4chan images on your phone
>>
>>56446791
If the image doesn't look like a little girl 12 years old are younger it doesn't get downloaded.
>>
>>56443100
Share the script, anon-kun.
>>
Hoarding is a mental disease.
>>
>>56443100
Everyone and their mother has written an image scraper for 4chan buddy
>>
>not mass downloading 4chan mass downloaders
>>
>he didn't make his own 4chan image downloader
pic related, it keeps on downloading till thread is 404 or archived
>>
>4chan
>anything worth download
Really moves the cogs if you know what I mean.
>>
>>56448728
Looks pretty good, anon. I like the minimalism.
>>
>>56448728
pic related, it keeps on downloading till 4chan 404s or is archived -_-
>>
>>56448728
>>56448763
pretty damn sexy tbqhfwy
>>
>accidentally saving cheese pizza
yeah no...
>>
>>56448950
>"accidentally"
I hate it when that happens.
>>
>>56448950
>what is browser cache
>>
this thread is fucking pathetic. one of the first programs I ever made was a 4chan image downloader. I still occassionally use it.

everyone here should code one up
>>
>>56449031
>implying
>>
>>56443146
You can write a script to do it using basc-py4chan in five minutes
>>
>>56443100
for what purpose
>>
>>56443146
>I've done this before. It's a massive time sink.
only if you're a fucking retard... or pajeet.
>>
File: yawn.jpg (16KB, 300x228px) Image search: [Google]
yawn.jpg
16KB, 300x228px
>>56443100
>subtly trying to brag about your shitty, 30-line script
>>
>there are actually people in this thread who think using the 4chan api to download images is hard
/g/ - desktop threads and consumerism everyone
>>
>>56449337
but I made my own json parser
but I made my own 4chan lib
but it works in just under 150 lines of code
>>
>>56449524
congratulations, how does that have anything to do with what I said?
>>
File: Capture.png (716KB, 631x836px) Image search: [Google]
Capture.png
716KB, 631x836px
>>56443100
>>
File: Capture.png (8KB, 536x145px) Image search: [Google]
Capture.png
8KB, 536x145px
>>56449583
>>
File: durr.gif (186KB, 1920x1080px) Image search: [Google]
durr.gif
186KB, 1920x1080px
>>56449524
I did it in 15 lines of bash.
*shrug*
>>
>>56449591
why dont you show us the code?
>>
>>56449618
Its against the rules.
>>
>>56443111
>>56443300
>>56446462
>>56446549
>>56448483
>>56449618
Just go on GitHub and search for 4chan Downloader, you'll find a lot of projects about it.
>>
>>56443100
I only wrote a downloader for images since I didn't want to click save every image on /wg/.

Did it with beautifulsoup, is there a 4chan package for python or what?
>>
>>56449782
There is a readonly API for it. Go google it. There probably is a library for it somewhere but honestly if all you want is to download images a simple API call will be enough
>>
>>56449782
>Did it with beautifulsoup, is there a 4chan package for python or what?
Probably.

But you don't need to use bs or scrape the HTML for the images, you can request and parse the JSON file directly to get the information about the thread, including file names, original file names, MD5 and file size.

Hell, you can download an entire board or 4chan entirely by doing it, without using third party libraries, just json and urllib that's already included on Python.
>>
>>56449836
>>56449794

I didn't know that. Still fairly new to this shit. I will look into it once I have enough time. Archiving some threads on my laptop (or simply counting different generals and their activity) should be quite fun.
>>
>>56449861
>>56449836
If you are super lazy you can just use xidel to parse the json
>>
>>56449299
what? It's objectively a waste of time. the script takes 5 minutes.
>>
>>56449591
What does the 0 in your PS1 mean ? Status code of previous command ?
>>
>>56449889
Yeah its whatever code the previous command returns.

rstatus() {
if [[ $? -eq 0 ]];then
echo 0
else
echo ${PR_RED}$?
fi
}
>>
https://github.com/fellchase/4chan-media-downloader
>>
>>56449755
https://github.com/fellchase/4chan-media-downloader
got it for you
>>
>>56443129
empty hard drive is wasted hard drive
>>
File: benned.png (4KB, 345x58px) Image search: [Google]
benned.png
4KB, 345x58px
Enjoy your IP ban, faggots.
>>
Enjoy your viruses
>>
>>56449909
>>56449926
It's yours?
It's good but consider using the 4chan API instead, easier to parse and there's a lot of information about the thread/board on it that may be useful to you and to the user.
>>
>>56449965
thanks its my first project first time ever I made something useful :P
Started that in april of this year actually I don't want to add more dependencies actually I was going to replace requests with urllib and all so that there'll be no dependencies, but I like bs4 and requets very much :D that's why kept it
I made this project to learn python and download threads from /gif/ :) please commit bro
>>
>>56450020
You can use urllib and json, it's already included on Python so there's no need for third party libs.

You can easily expand it to use on other boards and even other imageboards as well.

I've made one with GUI (PyQt4) and it's quite easy too, so you can do a lot with it and it make things very easy to normies and illiterate people (if that's what you want).
>>
What's the point of this? Do people like hoarding images or what?
>>
>>56443178
This desu
>>
>>56444653
>mass downloading from boards where 90% of images are irrelevant
why?
>>
>>56450101
bro you're on github?
>>
>>56443100
DownThemAll!
>>
>>56449861
>>56449836

Bash + cURL + jq
Why even bother going into Python for something so simple
>>
For buggers too lazy to google:
https://github.com/4chan/4chan-API - read-only 4chan API, enjoy.
>>
>>56450112
well yea, gotta grow my 4chan.
It's a good idea to check for duplicates every once in a while
>>
Tfw I made one using Qt and C++. Still use it since it's ez to use and werks.

Also if you have to manually put in the board and thread ID, you did a shit job and should redo it.
>>
>>56449316
This.
Babby's first script.
>>
>>56449755
>Auto-Fetch all Images from 4chan to get hands free

kek
>>
>>56443129
cp harvesting on /b/
>>
File: 1431471048976.png (63KB, 217x338px) Image search: [Google]
1431471048976.png
63KB, 217x338px
>>56443100
>I downloaded a bunch of images using a super easy to use public API, aren't I special?

It can be done with more or less any competent language in about 40-50 lines tops, it might take you maybe 15 mins to have it all done and dusted.
>>
File: 1469984519006.jpg (41KB, 383x750px) Image search: [Google]
1469984519006.jpg
41KB, 383x750px
>>56448363
>If the image DOESN'T look like a little girl 12 years old are younger it DOESN'T get downloaded.
>>
>>56443100
Jesi ti onaj nas sa int, ex-yu ?
>>
File: Deki.png (105KB, 1081x420px) Image search: [Google]
Deki.png
105KB, 1081x420px
>>56451058
>ex-yu
Careful, he might be Deki.

>inb4 albozerg
>>
>>56451014
This. I've written shit like this for a whole bunch of websites.
>>
>>56449524
>but I made my own json parser
Why would you reinvent the wheel
Also
import json
>>
>>56451116
Deki > Fredi
Thread posts: 86
Thread images: 11


[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.