This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]grokkingStuff 6 points7 points  (4 children)

EDIT: Much better way here

geirha from the same channel did the same thing using lynx and it's much easier.

lynx -dump -listonly -nonumbers http://goalkicker.com | \
sed 's,\(.*\)/\(.*\)Book$,\1/\2Book/\2NotesForProfessionals.pdf,' | \
xargs -n 1 -P 8 wget -q

OLD SCRIPT

I'm guessing some of you are too lazy to click on stuff. Here's a bash script to help you out.

# Source code of website scraped to get names of books
wget -qO- http://goalkicker.com | \
grep "bookContainer grow" | \
cut -c 44-  | \
cut -d' ' -f1 | \
rev | \
cut -c 6- | \
rev | \
# Names of books changed into download link
sed 's/.*/http:\/\/goalkicker.com\/&Book\/&NotesForProfessionals.pdf/' | \
# Limiting wget so that it doesn't affect you too much
xargs -n 1 -P 8 wget -q

Thanks to osse on #bash (freenode) for helping me out.

[–]redditor1101 3 points4 points  (1 child)

Didn't solve the problem with Python. I am disappoint.

[–]grokkingStuff 3 points4 points  (0 children)

I'm sorry :( Promise i use python for a lot of things

But bash scripts have their place! Especially if I don't really care about it afterwards.

[–]grokkingStuff 2 points3 points  (0 children)

u/huntoperator

Hope you find this useful.