mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.26k stars 919 forks source link

A way to get URLs from the post #3358

Open Applewubs opened 1 year ago

Applewubs commented 1 year ago

This might sound quite noob, and im sorry for my broken english, but i just started using this a few months ago and im still learning to use it to almost anything.

Now the problem, On various sites like kemonoparty, twitter. facebook you can post URLs without a preview, these links dont make it to the gallery-dl, is there a way to make it analyze all including the text when it searchs for URLs? image

afterdelight commented 1 year ago

use post processor?

Applewubs commented 1 year ago

use post processor?

Thanks for the apparently obvious answer, but as I said, I'm kinda noob using this, so could you please elaborate better?

afterdelight commented 1 year ago

i got this from other gallery-dl issue which i forgot

"postprocessors": [
                {
                    "name": "metadata",
                    "event": "post",
                    "filename": "{id} {title}.txt",

                    "#": "write text content and external URLs",
                    "mode": "custom",
                    "format": "{content}\n{embed[url]:?/\n/}",

                    "#": "only write file if there is an external link present",
                    "filter": "embed.get('url') or re.search(r'(?i)(gigafile|xgf|1drv|mediafire|mega|google|drive)', content)"
                }
            ]
afterdelight commented 1 year ago

@mikf what does {embed[url]:?/\n/} mean?

Hrxn commented 1 year ago

Takes the value from {embed[url]} if it is available / not "None", inserts it into the string and appends it with a newline (\n)