def extract_item_data(deal):

    merchant = {}
    for field in MERCHANT_FIELDS:
        if field in deal:
            merchant[field.replace('merchant_', '')] = deal[field]
            del deal[field]

    if 'merchant_city' in deal:
        del deal['merchant_city']

    deal['date_time'] = tz.now()
    return deal, merchant
Separate deal and merchant data.
dataset/ETHPy150Open tryolabs/daywatch/daywatch/core/scraper/item_scraper/pipelines.py/extract_item_data