Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Created April 14, 2014 18:36
Show Gist options
  • Save daryltucker/10672494 to your computer and use it in GitHub Desktop.
Save daryltucker/10672494 to your computer and use it in GitHub Desktop.
Download a specific subdirectory of a website while preserving referenced media.
#!/bin/bash
# @daryltucker
# This will download files within a specific directory but preserve media. For example:
# www.domain.tld/subdirectory/
# index.html
# page1.html (contains an image on www.domain.tld/images)
# page2.html (contains an image on www.domain.tld/)
wget -p -r -l1 --no-parent "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment