commit 1d7294a8e1b18c6a6c27f466c0085c0492e0e2f3 parent 1c61584ca7019a998038b4949a625605d4ce1895 Author: clamiax <smoppy@gmail.com> Date: Sun, 5 Jan 2014 20:28:41 +0000 Improve image matching. Diffstat:
M | scrapthumb | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scrapthumb b/scrapthumb @@ -29,7 +29,7 @@ preload() { [ $i -eq 0 -a $mod -ne 0 ] && t=$(echo $tot + 1 | bc) || t=$tot for n in $(seq 1 $t) do - IMGS[$i]="$(wget -qO - "$src/random" |grep 'property="og:image"' | sed 's/.*content="\(.*.jpg)\)".*/\1/')" + IMGS[$i]="$(wget -t 1 -qO - "$src/random" |grep -o 'property="og:image" content=".*"' |cut -b 29- |tr -d '"')" i=$(echo $i+1|bc) done done