#!/usr/bin/python import requests, re, json, os, yaml from db import * from aliexpress import * def get_conf(): '''return settings in settings.yaml file''' with open(os.path.dirname(os.path.realpath(__file__))+"/settings.yaml", 'r') as conf_file: settings = yaml.safe_load(conf_file) return settings if __name__ == '__main__': settings = get_conf() # initialize(settings["db"]) fill_db(settings["db"], check_items(settings["item"])) export_csv(settings["db"])