Quick! Write program in you favorite language which downloads all media attachments from a Sup Forums thread into the current directory.
The shortest code wins.
Quick! Write program in you favorite language which downloads all media attachments from a Sup Forums thread into the...
Other urls found in this thread:
i.4cdn.org
quora.com
'
pastebin.com
twitter.com
curl -O i.4cdn.org
:^)
That's scripting and not a programming language
>Goes from "favorite language" to "programing language"
Of course
wrong
Oh we are shell scripting?
wget -nc -nd -nv -e robots=off -ER html,s.jpg -rHD i.4cdn.org
Actually -nc and -nv isn't needed, but it's less spam and saner.
images = self.driver.find_elements_by_tag_name('img')
for image in images:
src = image.get_attribute("src")
if src:
urllib.urlretrieve(src)
Name one (1) way that bash isn't a programming language.
Uhm sweetie, bash is in shells. That's script.
Or else what?
I just feel like Sup Forums is full of these people. To dumb to know how dumb they are
Here you are hanging out with them.
>not just physically stealing the server hosting the thread.
Nice try friendo :^)
The best answer without a doubt is perl. Its meant to do this kind of stuff as easy as possible. Theres probably a cpan module for exactly that.
didn't write this, just lifted it from an old Sup Forums thread.
wget -erobots=off -nd -rHD4cdn.org -Ajpg,png,gif,webm -Rs.jpg
Télécharger des images
Stupidity doesn't spread by osmosis. This is like going to the zoo and watching the monkeys for us, bro.
Bash is Turing complete, so it's a programming language.
>open attachment
>right click
>save
>move to next attachment
:^)
BIRDMIN NO
...
kek
Oh alright.. stupid bird..
require 'open-uri'
html = open(ARGV[0]).read
urls = html.scan(/(i\.4cdn\.org\/g\/1[0-9]{12}\.)(jpg|png|gif|webm)/)
urls.uniq.each do |url|
furl = '' + url.join
File.open(furl.split('/').last, 'wb') do |pic|
puts 'Downloading: ' + furl
pic.write open(furl).read
end
end
oh crap, the regex only works on Sup Forums.. oh well, fix it yourself.
Not sure if this counts, but this is actually a script I've been working on. I'm still pretty much a novice, so I'm sure there are a bunch of things I could've done better, but it downloads all images in a thread if a thread url is given as the argument, and all images from a board if a catalog link is given. If it's downloading a single thread, it'll download all images, then wait 60 seconds and download any new images. It's multithreaded and will download each image into a folder for the thread it's in
pastebin.com
Perl is fucking garbage.
Current directory?
Casual mode,, at least create some sub folders,, and put that shit in /microsoft office/users/Dan/logs/HTML/old/