Add Path to image scraper args#6856
Add Path to image scraper args#6856NativeRavenclaw wants to merge 2 commits intostashapp:developfrom
Conversation
Gykes
left a comment
There was a problem hiding this comment.
So, i'm a little confused on what you are trying to accomplish here. If you are trying to do what I think you are trying to do them I believe that creating an imageInput similar to scene and gallery input with a Files []fileInput would be better. Again, without a full unerstanding of your goal then it's had to recommend any alternatives.
|
I'm trying to get a custom python scraper to get the path/filename of an image from def main():
op, args = scraper_args()
log.info("op: %s\n" % op)
log.info("args: %s\n" % args)
result = None
match op:
case "image-by-fragment":
input_data = args
# path = input_data['files'][0]['path'] # <--- does not exist
path = input_data['path'] # <--- exists with this PR
result = image_by_fragment(path)
case "scene-by-fragment":
input_data = args
path = input_data['files'][0]['path'] # <--- exists
log.info("path: %s\n" % path)
result = scene_by_fragment(path)Using |
d7353a5 to
d7037ae
Compare
|
I think that's better? Running it through a scraper through the UI, the |
Tools like
gallery-dl --write-metadataprovide additional metadata to the download as separate file, i.e./stash/pic.pnggets an accompanying/stash/pic.png.json.Adding a
Pathfield to the scraper args will allow scrapers to find such metadata files. This seems in line with scenes/galleries passing their Filename(s) to their scraper args.