Skip to content

Commit 8776138

Browse files
committed
Fix:
curl fileName bug
1 parent c6c839e commit 8776138

9 files changed

+9
-4
lines changed

kickass/__init__.pyc

-26 Bytes
Binary file not shown.

kickass/curl_torrent.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ function usage(){
99
exit 1
1010
}
1111

12-
if [ ! -n "$1"]; then
12+
if [ ! -n "$1" ]; then
1313
usage
1414
fi
1515

16-
name=`echo $1 | sed 's/.*kickass.to.//'`".torrent"
16+
name=`echo $2 | sed -n 's/ //g'`
17+
name=$name".torrent"
18+
echo "file name: "$name
1719
curl --globoff --compressed -A '$AGENT' -L --post302 $1 > $name
1820
btc add $name

kickass/items.pyc

-52 Bytes
Binary file not shown.

kickass/pipelines.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ def process_item(self, item, spider):
2626

2727
class TorrentPipeline(object):
2828
def process_item(self, item, spider):
29-
print "Downloading " + item['title'][0]
29+
print "============================================"
30+
title = item['title'][0]
3031
path = item['torrent'][0]
31-
subprocess.call(['kickass/curl_torrent.sh', path])
32+
print "Downloading " + item['title'][0]
33+
print "path: " + path
34+
subprocess.call(['kickass/curl_torrent.sh', path, title])
3235
time.sleep(10)
3336
return item

kickass/pipelines.pyc

-28 Bytes
Binary file not shown.

kickass/settings.pyc

-26 Bytes
Binary file not shown.

kickass/spiders/__init__.pyc

-26 Bytes
Binary file not shown.

kickass/spiders/g.pyc

-78 Bytes
Binary file not shown.

kickass/spiders/kickassSpider.pyc

-111 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)