Permalink
Browse files

url parsing fix

  • Loading branch information...
Like-all authored and lexszero committed Feb 2, 2014
1 parent cb914ce commit aae6b69ab54c689d182135c79eadcb629a007ab5
Showing with 2 additions and 3 deletions.
  1. +2 −3 youporn.com/youporn
View
@@ -1,10 +1,9 @@
#!/usr/bin/env bash
query=`echo $1 | tr ' ' '+'`
porn_pages=`curl -sL "http://www.youporn.com/search/relevance/?category_id=0&type=straight&page=1&query="$query | grep "videoTitle" | cut -f 3 -d "/"`
porn_pages=`curl -sL "http://www.youporn.com/search/relevance/?category_id=0&type=straight&page=1&query="$query | grep -E "videoTitle.*watch" | cut -f 3 -d "/"`
for i in `echo $porn_pages | tr ' ' '\n'`; do
curl -sL 'http://youporn.com/watch/'$i | grep "For iPhone" | sed 's:</li>:^:g;s:<a :*:g' | cut -f 3 -d '^' | cut -f 2 -d '*' | sed 's:>MP4.*::;s:href=\"::;s:\"::;s:\t::g;s:</ul>::' | htmldecode
curl -sL 'http://youporn.com/watch/'$i | grep '$video.src' | uniq | sed -e "s|\$video.src = '||;s|'\;||"
done

0 comments on commit aae6b69

Please sign in to comment.