2023-12-28 13:38:21 +01:00
|
|
|
#!/usr/bin/python
|
2023-12-27 23:56:11 +01:00
|
|
|
import requests, re, json, os, yaml
|
2023-12-28 13:38:21 +01:00
|
|
|
from db import *
|
|
|
|
from aliexpress import *
|
2023-12-27 23:56:11 +01:00
|
|
|
|
|
|
|
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
|
2023-12-27 18:32:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
2023-12-27 23:56:11 +01:00
|
|
|
settings = get_conf()
|
2023-12-27 21:52:57 +01:00
|
|
|
|
2023-12-28 17:39:36 +01:00
|
|
|
#initialize(settings["db"])
|
|
|
|
fill_db(settings["db"], check_items(settings["item"]))
|
2023-12-27 23:56:11 +01:00
|
|
|
|
2023-12-27 18:32:27 +01:00
|
|
|
|