![]() |
python script download torrents
I want to make a python script that will automatically download torrent files for me. I am able to use feedparser.py to get a url from a rss feed. here is what the url looks like
http://isohunt.com/btDetails.php?ihq...ens&id=6071088 on this page(the link above) their is a link I click on called "download.torrent". Then that opens up the save dialog in my browser that allows me to download the torrent file. Is there a way to download this torrent file, aoutomatically(not using my web browser) using urllib2 or some other module? Any suggestions would be appreciated. Thanks :-) |
Code:
#!/usr/bin/env python |
Thanks :-)
That was to easy. I have used urllib.urlretrieve in the past, but did not think it would work. Here is where I got confused. To test it I tried to use wget like this this failed(I assumbed urllib would also fail). I thought because the url did not end with a file name, it was going to be more complex(I know next to nothing about web or web programming) but this works great Code:
urllib.urlretrieve('http://isohunt.com/download.php?mode=bt&id=6071088', 'king.torent') |
| All times are GMT -5. The time now is 06:05 PM. |