[ / / / / / / / / / / / / / ] [ dir / random / abdl / cow / cuteboys / erp / islam / rule34 / s / tech ][Options][ watchlist ]

/tech/ - Technology

Freedom Isn't Free
You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): b2891dd927c41e5⋯.png (56.67 KB, 280x254, 140:127, wget_is_not_a_crime_8kun.png) (h) (u)

[–]

 No.1086085>>1086086 >>1086087 >>1086155 [Watch Thread][Show All Posts]

The command-line tool `wget` is pretty powerful if you know how to use it properly, as it has loads of flags...

Say, for example you wanted to download an entire 8kun board onto your local machine and have all the links work within, locally. More difficult than just `wget https://8kun.top/tech/` or something idiotic like that, because it would only grab the front page .html, not the Catalog, or any of the threads, blah blah. If you do a -r flag it will go recursively, but what a can of worms that would open up! I don't feel like going into all the parameters of what it is I would do and why, you can research for yourself, but I will touch on the only concern I have at this time, which is that, while I have written a nice script for this kind of activity, and I can get all the goodies like the CSS and internal links working locally, I want to keep it at the board level and not download the entire fucking 8kun site, but I do want the pictures, which are at a higher level, in https://8kun.top/files/* (which sucks for snagging just the images associated with one board.) Nonetheless, check out this script, lads... So far I have only tested it on a tiny board: >>>/wethepatriots/ and it works nicely. (FYI, running this script on that board at this time will download only 1.8 MB, so it's a nice test.)

I rate-limited it so VanwaFuck would not think I'm an attacker, and made myself look like I'm a Firefox browser making browser requests every 5 seconds. I guess I could have done a `random-wait` instead... The script is a work in progress. I also don't think `no-clobber` and `convert-links` will work very well together, as `convert-links` will supercede, depending on the circumstances. I'm rambling, and 8kun-formatting is probably gonna fuck up that whole last sentence anyway, and purple-text the fuck out of it, so... Here's the script: (the formatting will probably turn the double "-" "-" into an emdash "--") too, so be sure to put 2 "-"s instead of the emdashes, which are not the same character) Still digressing, here's the script!

```

wget \

--recursive \

--no-clobber \

--page-requisites \

--html-extension \

--convert-links \

--restrict-file-names=unix \

--domains 8kun.top \

--wait=5 \

--limit-rate=20K \

--user-agent=Mozilla \

--level=10 \

--output-file /home/anon/test/activity.txt \

--no-parent \

https://8kun.top/wethepatriots/ &

```

you can do a `tail -f activity.txt` in another terminal to see wtf is happening after you make that command...

This is assuming you have made a Directory in your Home Folder called `test`, that your username is `anon`, and that you are running this command in a terminal inside that `test` folder...

Read the Code! Don't just copy/paste!

But yeah, if any anons have an idea for a simple way I can snag all the images for just one board and have the links work locally,hook me up!

Otherwise, clicking on a thumbnail or image link will take you to https://8kun/top/files/* and that just plain isn't very local! I'm sure a Python script could work, but I was hoping for a simple `wget` solution.ANY IDEAS?

>inb4 kys

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1086086 >>1086087

>>1086085 (OP)

Yeah, I had a feeling about the purple-text, but at least it translated the code correctly. You could run that code as is by inserting your own username and making a `test` directory in /home/

>inb4 that board gains more popularity than it warrants!

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1086087

File (hide): 2f7b2c00c87632d⋯.png (235.93 KB, 828x780, 69:65, btw_They_Dont_Know.png) (h) (u)

>>1086085 (OP)

>>1086086

There is a previous thread about this at:

>>>/freedomzine/13705

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1086091 >>1086094

>ANY IDEAS?

yeah, kill yourself

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1086094

>>1086091

i second this notion

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.1086155

>>1086085 (OP)

well that's cool

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Screencap][Nerve Center][Random][Update] ( Scroll to new posts) ( Auto) 5
5 replies | 1 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / random / abdl / cow / cuteboys / erp / islam / rule34 / s / tech ][ watchlist ]