Update for changes to 1337x.to

This commit is contained in:
cxford 2016-10-17 10:55:18 -05:00
parent bef501886a
commit 7425722bed
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
torrentengine="https://1337x.to/search/%s/1/" torrentengine="https://1337x.to/search/%s/1/"
torrentterms='printf https://1337x.to; grep "/torrent/" | head -n 1 | cut -f 2 -d \"' torrentterms='printf https://1337x.to; grep "/torrent/" | head -n 1 | cut -f 10 -d \"'
magnetposition='4' magnetposition='4'
torrentdebugging='false'
searchunifier='+' searchunifier='+'
magnetseparator=\" magnetseparator=\"
torrentdebugging='true'

View File

@ -74,7 +74,7 @@ function torrent {
export searchstring="$(echo $i | sed 's/ /+/g')" export searchstring="$(echo $i | sed 's/ /+/g')"
export searchlink="$(printf "$torrentengine" "$searchstring")" export searchlink="$(printf "$torrentengine" "$searchstring")"
export searchresult=$(wget -q -O - "$searchlink" | bash -c "$torrentterms") export searchresult=$(wget -q -O - "$searchlink" | bash -c "$torrentterms")
export magnetlink=$(wget -q -O - "$searchresult" | grep 'magnet:?' | cut -f $magnetposition -d $magnetseparator) export magnetlink=$(wget -q -O - "$searchresult" | grep 'magnet:?' | head -n 1 |cut -f $magnetposition -d $magnetseparator)
if [ $torrentdebugging == "true" ]; then if [ $torrentdebugging == "true" ]; then
echo $searchstring echo $searchstring
echo $searchlink echo $searchlink