returns subtitles as string

def get(self, filename):
        """ returns subtitles as string """
        params = {
            "v": 'dreambox',
            "kolejka": "false",

            "nick": "",
            "pass": "",

            "napios": sys.platform,
            "l": self.language.upper(),

            "f": self.prepareHash(filename),
        }
        params['t'] = self.discombobulate(params['f'])

        url = self.url_base + urllib.urlencode(params)

        subs = urllib.urlopen(url).read()

        if subs.startswith('brak pliku tymczasowego'):
            raise NapiprojektException('napiprojekt.pl API error')

        if subs[0:4] != 'NPc0':
            # napiprojekt keeps subtitles in cp1250
            # ... but, sometimes they are in utf8
            for cdc in ['cp1250', 'utf8']:
                try:
                    return codecs.decode(subs, cdc)
                except:
                    pass