"""

from classes.EtsyApi import EtsyApi
import pandas as pd
import json
import time

STEPS_MAX = 1000
SHOPS_CONTROL_FILE = '_outputs/shops_products_control.xlsx'
OUTPUT_PATH = '_outputs/shops_listings/'

step = 0

while step < STEPS_MAX:

    etsy = EtsyApi()

    df = pd.read_excel(SHOPS_CONTROL_FILE)

    idx = df[df.checkedDate == 0].head(1).index

    if idx.empty:
        print('Finished !')
        break

    else:
        shop_id = idx[0]

        page = 1

        while page: