def getlog(start, end, deplist=['00'], modlist=['M0'], xlsx=None):
    '''
        batch gets changelogs for cogs
    '''
    # entry point url
    api = 'http://www.insee.fr/fr/methodes/nomenclatures/cog/recherche_historique.asp'
    # build payloads
    if modlist == ['M0']:
        modlist = ['MA', 'MB', 'MC', 'MD', 'ME', 'MF', 'MG']
    payloads = [{'debut':start, 'fin':end, 'dep':dep, 'mod':mod} for dep in deplist for mod in modlist]
    # send requests
    results = [pg2df(requests.get(api, params=payload)) for payload in payloads]
    # make a df and fine tune it (force dtypes)
    data = pd.concat(results)
    data.reset_index()
    data['date'] = pd.to_datetime(data['date'], format='%d/%m/%Y')
    data[['dep', 'depcom', 'mod', 'obs']] = data[['dep', 'depcom', 'mod', 'obs']].astype(object)
    # write xlsx
    if xlsx:
        pd.core.format.header_style = None
        data.to_excel(xlsx, index=False)
    
    return pd.concat(results)
batch gets changelogs for cogs