Here are the examples of the python api sys taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

0 View Source File :
License : MIT License
Project Creator : oottppxx

    def read_providers(self, providerfile):
        # Check we have data
            if not os.path.getsize(providerfile):
                raise Exception('Providers file is empty')
        except Exception, e:
        with open(providerfile, "r") as f:
            for line in f:
                if line == '400: Invalid request\n':
                    print("Providers download is invalid please resolve or use URL based setup")
                line = base64.b64decode(line)
                if line:
                    provider = {
                        'name': line.split(',')[0],
                        'm3u': line.split(',')[1],
                        'epg': line.split(',')[2]
                PROVIDERS[provider['name']] = provider

        if not DEBUG:
            # remove providers file
        return PROVIDERS

    def process_provider(self, provider, username, password):