diff --git a/curate.py b/curate.py index 22c6db5..f6db7cd 100644 --- a/curate.py +++ b/curate.py @@ -15,6 +15,6 @@ dropd = curate.drop_nvl_cols(nvl_training) expanded_dfs = curate.expand_nvlclass(class_training, dropd) expanded_class = expanded_dfs[0] expanded_dropd = expanded_dfs[1] - +dict_pics = expanded_dfs[2] # TODO # need to replace expanded df's PictureURL col values with destination urls # TODO # still have the problem of duplicate listings. Possibly take care of this before you run curate diff --git a/ebay_api.py b/ebay_api.py index c576c29..e115655 100644 --- a/ebay_api.py +++ b/ebay_api.py @@ -275,11 +275,13 @@ class CurateData: # curate.make_dict_pics(expanded_class_training) # custom image url dict dict_pics_list = set(expanded_class_training.PictureURL.to_list()) # prolly need to create set long before df... immediately after Shopping or trading call - dict_pics = {k:destination+re.search(r'\w+(?=/\$_)', a).group()+'.jpg' for k in dict_pics_list} # TODO determine how to implement destination variable + destination = 'your target folder' # decide whether or not you want to set a default folder to have the user define it as input every time. or have this only + # defined in the download function + dict_pics = {k:destination+re.search(r'\w+(?=/\$_)', k).group()+'.jpg' for k in dict_pics_list} # TODO determine how to implement destination variable # re.search(r'\w+(?=/\$_)', a).group() - return expanded_class_training, expanded_dropd # TODO still need to replace source url to destination url in df cols and create custom dict {, } + return expanded_class_training, expanded_dropd, dict_pics # TODO still need to replace source url to destination url in df cols and create custom dict {, } def dl_pictures(self): '''