import os,sys,re,urllib #NZB_ = {'Details':[], 'Genre':[], 'Year':[], 'Tagline':[], 'Plot':[], 'Rating':[], 'Runtime':[], 'Actor':[], 'Alias':[]} def Details(url): global detail IMDb_ = {'Details':[]} details = re.compile(r'
.*') in_details = re.compile(r'">(.*?)
') sock = urllib.urlopen(url) page = sock.readlines() sock.close() for i in page: if details.match(i) != None: try: IMDb_['Details'].append(in_details.search(i).group(1).strip()) except: IMDb_['Details'].append('None') Detail = str(IMDb_['Details']) Details("http://www.imdb.com/title/tt0233469/plotsummary") print detail """ I'd like to have this function setup so I can define the variable name to save the details to within the function call, something like: Details("http://www.imdb.com/title/tt0233469/plotsummary", MyVariable) print MyVariable """