[booru] add an option to extract notes (only gelbooru for now) (#1457)

* [booru] add an option to extract notes (currently implemented only for gelbooru)

* appease linter

* [gelbooru] rename "text" to "body" in note extraction

* add a code comment about reusing return value of _extended_tags
This commit is contained in:
thatfuckingbird
2021-04-13 23:40:24 +02:00
committed by GitHub
parent 78d7ee3ef4
commit dff03a6605
5 changed files with 74 additions and 3 deletions

View File

@@ -108,4 +108,26 @@ class GelbooruPostExtractor(GelbooruBase,
"pattern": r"https://img\d\.gelbooru\.com/images"
r"/22/61/226111273615049235b001b381707bd0\.webm",
}),
# notes
("https://gelbooru.com/index.php?page=post&s=view&id=5997331", {
"options": (("notes", True),),
"keywords": {
"notes": [
{
"height": 553,
"body": "Look over this way when you talk~",
"width": 246,
"x": 35,
"y": 72
},
{
"height": 557,
"body": "Hey~\nAre you listening~?",
"width": 246,
"x": 1233,
"y": 109
}
]
}
}),
)