gallery-dl icon indicating copy to clipboard operation
gallery-dl copied to clipboard

How can I get the page-URL at the same time as just the IMG-URL

Open fir05 opened this issue 1 year ago • 0 comments

How can I get the page-URL at the same time as just the IMG-URL?

Most of the websites will limit the download of pages, but there is no restriction on the download of image files. And gallery-dl is not good at asynchronous downloads. So I want gallery-dl to just fetch the URL and I use a script to download the image files. But I'm having problems getting the URL.

1, the “-g” parameter just prints the URLs, but it doesn't help to use them, it just seems to validate that it is “able to fetch the URL”. What I need is to save the URL to a file. So how do I save the URLs to a file? 2, How do I get the page-URL at the same time as the IMG-URL? I am used to keep its source information in the filename of the image. For example “TW[GWZKy42a8AAh5vz&1830232543351931326].jpg” so that the image viewer can download its original version or open its source page.

So the final aggregated question is: is there a way to save page data and image data to a file? Something like “--write-url_file d:\a.txt”. gallery-dl appends the address to this file every time it fetches a page.

File similar:

{"page":"https://x.com/iorimoe_five/status/1830232543351931326",list:["https://pbs.twimg.com/media/GWZKy42a8AAh5vz?format=jpg","https://pbs.twimg.com/media/GWZKy42a8AAh5vz?format=jpg"]}

{"page":"https://x.com/iorimoe_five/status/1830232543351931326",list:["https://pbs.twimg.com/media/GWZKy42a8AAh5vz?format=jpg","https://pbs.twimg.com/media/GWZKy42a8AAh5vz?format=jpg"]}

fir05 avatar Sep 06 '24 14:09 fir05