def analyze_imdbid(href):
 if (not href):
  return None
 match = re_imdbid.search(href)
 if (not match):
  return None
 return str(match.group(2))

def analyze_imdbid ( href ) : if ( not href ) : return None match = re_imdbid . search ( href ) if ( not match ) : return None return str ( match . group ( 2 ) )
return an imdbid from an url .