Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the text description from the image page? #310

Closed
paulolimac opened this issue Jun 14, 2019 · 5 comments
Closed

How to get the text description from the image page? #310

paulolimac opened this issue Jun 14, 2019 · 5 comments

Comments

@paulolimac
Copy link

I can get the text from flickr, but can not get from instagram nor deviantart.

So using the instruction from here, I coded this config:

{
	"extractor":
	{
		"sleep": 1,

		"postprocessors":
		[
			{
				"name": "metadata",
				"mode": "custom",
				"format": "{description}\n"
			}
		]

	}
}

Used those pages to test:

@mikf
Copy link
Owner

mikf commented Jun 14, 2019

You need to enable the metadata option to get description texts from DeviantArt (extra API calls necessary, therefore "hidden" behind an option).

There is currently no description available for Instagram pictures.

(You can see all available metadata fields with
gallery-dl -K <URL> or, as JSON, with gallery-dl -j <URL>)

@mikf
Copy link
Owner

mikf commented Jun 17, 2019

Instagram now also has description metadata (03e6876)

@mikf mikf closed this as completed Jun 17, 2019
@paulolimac
Copy link
Author

Hi @mikf, thanks for your reply!
Now I learned how to get the Deviantart and Instagram descriptions.
And to verify the metadatas from each supported domain.

Because I'm using pip, I could not run your new code to get Instagram descriptions (maybe a version release issue, I'm using 1.8.6).
But I appreciated so much that you coded to solve my question.
Really, thank you for that! 👍

For those insterested, I runned the command with my re-coded config.json, both bellow:
$ gallery-dl --config=./config.json https://www.deviantart.com/onistocke/art/CatButt-801590024

config.json:

{
	"extractor":
	{
		"sleep": 1,

		"postprocessors":
		[
			{
				"name": "metadata",
				"mode": "custom",
				"format": "{description}\n"
			}
		],

		"flickr":
		{
			"filename": "{date}_-_{title}_-_{id}.{extension}",
			"postprocessors": [{
              			"name": "metadata",
		                "mode": "custom",
                		"format": "{title}\n{date}\n{description}\n"
	                }]

		},

		"instagram":
		{
			"date-format": "%Y-%m",
			"filename": "{date}_-_{media_id}_-_{shortcode}.{extension}"
		},

		"deviantart":
		{
			"metadata": "true",
			"filename": "{date}_-_{title}_-_{index}.{extension}",
			"postprocessors": [{
              			"name": "metadata",
		                "mode": "custom",
                		"format": "{title}\n{date}\n{description}\n"
	                }]

		}
	}
}

@Hrxn
Copy link
Contributor

Hrxn commented Jun 23, 2019

@paulolimac
Not sure what you mean with pip here, why would this be a restriction?
You can always do something like this;
pip install --upgrade https://github.com/mikf/gallery-dl/archive/master.zip

@paulolimac
Copy link
Author

Yes @Hrxn, it is a restriction/requirements for me only, not for this thread itself.
And thanks, it is good to have many ways to do the pip installation/upgrade.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants