Beispiel #1
0
indexedShows = {}
shows = []

with open('title-map.json') as titlemap_file:
    titlemap = json.load(titlemap_file)
with open('multi-season.json') as multiseason_file:
    multiseason = json.load(multiseason_file)
with open('azure.json') as azure_file:
    azure_storage = json.load(azure_file)
azure_blob = BlockBlobService(account_name=azure_storage['account'],
                              account_key=azure_storage['key'])
with open('proxies.json') as proxies_file:
    proxy_data = json.load(proxies_file)
    proxy = proxy_data['au']
sources = [
    animesources.Crunchyroll(titlemap, multiseason, 'au', proxy),
    animesources.Netflix(titlemap, multiseason, 'au', proxy),
    animesources.AnimeLab(titlemap, multiseason, 'au', proxy),
    animesources.HiDive(titlemap, multiseason, 'au', proxy)
]
for source in sources:
    source.UpdateShowList(indexedShows)
    print(source.GetName() + ': ' + str(len(indexedShows)))
shows = indexedShows.values()
with open('alternates.json') as alternates_file:
    alternates = json.load(alternates_file)
for alternate in alternates:
    match_index = next((i for i, x in enumerate(shows)
                        if animesources.compare(x['name'], alternate)), False)
    if (match_index):
        shows[match_index]['alt'] = alternates[alternate]
Beispiel #2
0
    "sites": {
        "netflix": "http://www.netflix.com/title/70204981"
    }
}]

with open('title-map.json') as titlemap_file:
    titlemap = json.load(titlemap_file)
with open('multi-season.json') as multiseason_file:
    multiseason = json.load(multiseason_file)
with open('azure.json') as azure_file:
    azure_storage = json.load(azure_file)
azure_blob = BlobService(account_name=azure_storage['account'],
                         account_key=azure_storage['key'])
sources = [
    animesources.Hulu(titlemap, multiseason),
    animesources.Crunchyroll(titlemap, multiseason),
    animesources.Funimation(titlemap, multiseason),
    animesources.AnimeNetwork(titlemap, multiseason),
    animesources.Netflix(titlemap, multiseason),
    animesources.Daisuki(titlemap, multiseason),
    animesources.Viewster(titlemap, multiseason)
]
for source in sources:
    source.UpdateShowList(shows)
    print(source.GetName() + ': ' + str(len(shows)))
with open('alternates.json') as alternates_file:
    alternates = json.load(alternates_file)
for alternate in alternates:
    match_index = next((i for i, x in enumerate(shows)
                        if animesources.compare(x['name'], alternate)), False)
    if (match_index):