FindPage
View Source:
KnowledgeBase/Scripts/e621
Note:
You are viewing an old version of this page.
View the current version.
<code brush="bash"> e621_post_to_link() { post="${1}" wget -qO- "http://www.e621.net/post/show/${1}" | sed -e '/class="original-file-unchanged"/!d; s/^.* href="//g; s/" class=".*$//g' } e621_download_post() { post="${1}" url="$(e621_post_to_link "${post}")" file="${2:-$(echo "${url}" | sed -e 's/\?.*$//; s/^.*\/\([^\/]*\)$/\1/')}" wget -O "${file}" "${url}" } </code>