[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
post you're four-channel downloader also post they're
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 39
Thread images: 4
post you're four-channel downloader
also post they're functionalities and what programmer language you usd
picture relevant
>>
Kay, but what the fuck is Chan.

Haskell looks pretty good desu senpai.
>>
>>53818534
sorry,
CJSON and Chan are my own modules I wrote
post your pls
>>
>>53818694
pastebin that shit you dirty mexican
>>
>>53818732
but my json lib is still buggy and I haven't implemented customizable ncurses cui with concurrent downloading yet
why do u need it anyway?
im a beginnor programer, I am shit at code
picture renevant
>>
>>53818419
>tfw mine isn't done yet
At least i can browse text only from a repl. Written in Python but I want to transfer it to C.
>>
>>53818817
no, don't, I herd C is bad with strings
stick to python
what r they're functionalities?

for mine; current is download till 404 or archive,
future is concurrent downloading and possible ncurse ui
>>
>>53818831
It might be, but I like both C and Python so I'd enjoy seeing how to solve those issues in C. Right now I can migrate boards, view all threads on a board, and look at all posts in a thread. It's trivial to add picture downloading since I have all the data already, but I want to browse off an ncurses TUI eventually both to conserve RAM (because browsers suck) and make an interface that I like. Also just for fun and practice.
>>
>>53818888
make sure to use w3m for images
but, if u r going to make a useufl program, make sure the program is very flexible like ranger is
>>
>>53818911
Ranger was one of the first places I looked to. There's actually an article I came across that explains using w3m for images in a terminal (or I could look at Rangers' source, either way). The other way I saw was calling an external program (like sxiv or a configured viewer) to handle images so I could leave both options open. I haven't answered the question of how to facilitate posting but I'm sure that Clovers' codebase has the answer to that.
>>
>>53818948
clover?
wouldn't it be different though
clover is touch screen
unless you wanna literally copy their design and bind keys to the actions

i've thought about making a tui 4chan program too
one thing that can facilitate that approach is if you make the comments like in reddit, where they're nested
>>
>>53818983
Specifically I want to see how to work with the captcha system. You can do nesting, but I was still thinking on other designs that there could be besides nesting.
>>
>>53819204
you're obviously going to have to use a pass
also, there can only be nesting as an alternative
I don't see how a a chronological structure like a thread can be alterede anymore
>>
File: dump.png (144 KB, 960x531) Image search: [Google]
dump.png
144 KB, 960x531
Dumps images into a thread folder and watches for new ones until 404.

No fancy shit like reading or posting because I use a browser.
>>
What is the point of such a program?
>>
>>53819354
shit, I should learn a shell lang
but anyways, at least yours is shorter

mine has the same functions as urs
>>
>>53819411
downloading all thread imgs till 404
archiving threads
downloading boards
use all that programming knowledge one gained to actually make something
>>
why do you download four channel

this is mine


echo "enter 4chan url:"
read url
echo "specify file type:"
read filetype
echo "what board is it?"
read blet


curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 safari/534.30" -s $url -o website 2>/dev/null

tr ' ' '\n' <website | grep $filetype | sed s/"href="//g | sed s/"src"//g | sed s/"title"//g| sed s/"target"//g | sed s/"="//g | sed s/"_blank"//g | tr -d '"' | tr -d '//' | tr -d '>' | sed '/<a/d' | sed 's,org'$blet',\org/'$blet'/,g' | sed -e 's/^/http:\/\//' | sed '/s.jpg/d' | grep i.4cdn.org | uniq | sed '/webm/d' > dankmeme


wget --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 safari/534.30" -qi dankmeme -P /Users/poop/desktop/foto


>>
>>53819457
i download the channel because I want to get all thos girl asshole pics fast
also, very nice and concise, 3 upboats
>>
>>53819487
i cant tell if ur being foreal or making fun of me for all my tr'ing and greping and seding

this was like my first ever program that i made leave me alone senpai :(
>>
>>53819487
however, i also agree because i like them girls asshole pics but i also download comfy threads to feel more comfy
>>
>>53819548
im not making fun of you, fampai
more power to u, I don't even know how to use sed
>>
>>53819570
thx u fampai
>>
>>53818831
There's nothing wrong with using C for web scraping.

pointer arithmetic makes string extraction trivial
>>
>>53819625
no prob
anyways, imma look at some of the asshole pics, see ya later alligatorâ„¢
>>
>>53819663
I can't talk what I don't know about.
But I trust you. Why would you lie?
>>
>>53818419
Used to have a shitty script that downloaded pages and the full images and converted the page with shitty sed rules. Posting it could result in a ban like >>53819457
>>
People, ... you need to read manpages.

wget -qe robots=off -rHDi.4cdn.org -nc -nd -ERs.jpg,html <URL>


That's all you need. 57 chars.
>>
>>53820557
why even bother with it, i just ctrl+S
>>
I win:

@echo off
start 4chdl.exe
>>
>>53820557
Sorry for the stupid question: does this download all the pictures in a thread, right? (well, at least the jpg)
Is there an easy way to include webm and png without having to run it 3 times changing that parameter?
>>
>>53821490
For every image. Plus enter every time.

>>53823041
>.exe
I think that means you lose
>>
>>53818419

>2016
>haskell
>not using ligature fonts

https://github.com/tonsky/FiraCode
https://github.com/i-tu/Hasklig
>>
>>53819457
>>53820557
how to post code?
>>
Earl,

Attached is my python downloader for 4Channel. It keeps a simple text based database of threads downloaded so I can simply run an update command. It also allows me to download only webms from pornography threads.

Regards,
(Insert name here)
>>
>>53818419
Sorry to be a shithead but what colour scheme and font is that?
>>
>>53823901
>>51971506
>>
>>53818419
>kikes

function dta() {
wget -O - $1 | grep -Eo 'i.4cdn.org/[^"]+' | uniq | grep -v 's.jpg' | xargs wget -c
}
>>
lrn to bash — this downloads all images to the current dir

curl -s $1 | grep -o -i '<a href="//i.4cdn.org/[^>]*>' | sed -E 's%.*"//([^"]*)".*%\1%' | xargs wget
Thread replies: 39
Thread images: 4

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.