[deviantart] extend 'metadata' option (#5175)

alloe fetching extended metadata in addition to the usual
'description', 'tags', etc by setting 'metadata' to a list of
'camera', 'stats', 'submission', 'collection', and 'gallery'

for example "metadata": "stats,submission"
This commit is contained in:
Mike Fährmann
2024-02-18 23:04:31 +01:00
parent fc46177578
commit 741fd00cec
4 changed files with 104 additions and 12 deletions

View File

@@ -642,6 +642,37 @@ __tests__ = (
"#sha1_content": "6a7c74dc823ebbd457bdd9b3c2838a6ee728091e",
},
{
"#url" : "https://www.deviantart.com/shimoda7/art/For-the-sake-10073852",
"#category": ("", "deviantart", "deviation"),
"#class" : deviantart.DeviantartDeviationExtractor,
"#options" : {"metadata": "submission,camera,stats"},
"can_post_comment": False,
"description" : str,
"is_watching" : False,
"license" : "No License",
"stats": {
"comments" : int,
"downloads" : int,
"downloads_today": int,
"favourites" : int,
"views" : int,
"views_today" : int,
},
"submission": {
"category" : "traditional/drawings/other",
"creation_time" : "2004-08-25T02:44:08-0700",
"file_size" : "133 KB",
"resolution" : "710x510",
"submitted_with": {
"app": "Unknown App",
"url": ""
},
},
"tags": [],
},
{
"#url" : "https://www.deviantart.com/zzz/art/zzz-1234567890",
"#category": ("", "deviantart", "deviation"),