added dict_pics output to curate.py and set destination var in ebay_api.py
This commit is contained in:
parent
b205b44b50
commit
fcbe4e088c
@ -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
|
||||
|
@ -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 {<source>, <distination>}
|
||||
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 {<source>, <distination>}
|
||||
|
||||
def dl_pictures(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user