Permalink
Browse files

500px photos utility

  • Loading branch information...
Like-all authored and l29ah committed Jan 29, 2013
1 parent 64ccff6 commit bc71824243b9850918ff15a42c365227edab6eea
Showing with 13 additions and 0 deletions.
  1. +13 −0 500px.com/500px
View
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
query=$1
if [[ $query == '' ]]; then
query="popular"
fi
photo_paths=`curl -s "http://500px.com/search?q="$query | grep "photo/" | grep -vE 'canvas|download' | sed 's/>.*//;s/<a href="//;s/"//;s/\t//g'`
for i in `echo $photo_paths`; do
curl -s "http://500px.com"$i | grep -A1 thephoto | tail -n 1 | sed 's/<a href="//;s/">//;s/\t//;s/ //g'
done

0 comments on commit bc71824

Please sign in to comment.