Listing movies for torrenting
Shortening


  Can I get some help on shortening the amount of code I have in this program?


Shortening shouldn't be a primary concern. But ok let's go.



In get_file,
if an error occurs while downloading the page,
you print the exception, and then execution continues,
and the program will crash on the next line that tries to access the downloaded response.
You could just as well remove the try-except,
the result will be actually better,
because that way the crash will show the real problem (download error).

The same argument goes for the try-except in find_movies too.



You use two libraries to download data: requests and urllib.
You only need either of those, so you can get rid of one import.



file_name = file_name + '.torrent' can be shortened to file_name += '.torrent'



Instead of this:


torrent = select_torrent()
test(torrent)



You can delete the select_torrent function and write this:

torrent = raw_input('&gt;&gt;')
test(torrent)


Making it better

Follow PEP8, the Python coding style guide.

test is a very poor name for what it does.

Some validation for the selected torrent would be good.