fix 'keywords' in extractor tests (#3491)

pull/3460/head
Mike Fährmann 2 years ago
parent 3f29b8fe91
commit ed2d715019
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2014-2022 Mike Fährmann # Copyright 2014-2023 Mike Fährmann
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
@ -195,7 +195,7 @@ class GelbooruPostExtractor(GelbooruBase,
# notes # notes
("https://gelbooru.com/index.php?page=post&s=view&id=5997331", { ("https://gelbooru.com/index.php?page=post&s=view&id=5997331", {
"options": (("notes", True),), "options": (("notes", True),),
"keywords": { "keyword": {
"notes": [ "notes": [
{ {
"body": "Look over this way when you talk~", "body": "Look over this way when you talk~",

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2022 Mike Fährmann # Copyright 2022-2023 Mike Fährmann
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
@ -451,7 +451,7 @@ class NitterTweetExtractor(NitterExtractor):
}), }),
# age-restricted (#2354) # age-restricted (#2354)
("https://nitter.unixfox.eu/mightbecurse/status/1492954264909479936", { ("https://nitter.unixfox.eu/mightbecurse/status/1492954264909479936", {
"keywords": {"date": "dt:2022-02-13 20:10:09"}, "keyword": {"date": "dt:2022-02-13 20:10:00"},
"count": 1, "count": 1,
}), }),
) )

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2016-2022 Mike Fährmann # Copyright 2016-2023 Mike Fährmann
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
@ -772,7 +772,7 @@ class TwitterTweetExtractor(TwitterExtractor):
# age-restricted (#2354) # age-restricted (#2354)
("https://twitter.com/mightbecursed/status/1492954264909479936", { ("https://twitter.com/mightbecursed/status/1492954264909479936", {
"options": (("syndication", True),), "options": (("syndication", True),),
"keywords": {"date": "dt:2022-02-13 20:10:09"}, "keyword": {"date": "dt:2022-02-13 20:10:09"},
"count": 1, "count": 1,
}), }),
# media alt texts / descriptions (#2617) # media alt texts / descriptions (#2617)

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2021-2022 Mike Fährmann # Copyright 2021-2023 Mike Fährmann
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
@ -110,7 +110,7 @@ class VkPhotosExtractor(VkExtractor):
"pattern": r"https://sun\d+-\d+\.userapi\.com/s/v1/if1" "pattern": r"https://sun\d+-\d+\.userapi\.com/s/v1/if1"
r"/[\w-]+\.jpg\?size=\d+x\d+&quality=96&type=album", r"/[\w-]+\.jpg\?size=\d+x\d+&quality=96&type=album",
"count": ">= 35", "count": ">= 35",
"keywords": { "keyword": {
"id": r"re:\d+", "id": r"re:\d+",
"user": { "user": {
"id": "398982326", "id": "398982326",
@ -122,12 +122,11 @@ class VkPhotosExtractor(VkExtractor):
}), }),
("https://vk.com/cosplayinrussia", { ("https://vk.com/cosplayinrussia", {
"range": "15-25", "range": "15-25",
"keywords": { "keyword": {
"id": r"re:\d+", "id": r"re:\d+",
"user": { "user": {
"id" : "-165740836", "id" : "-165740836",
"info": "Предложка открыта, кидайте ваши косплейчики. При " "info": str,
"правильном оформлении они будут опубликованы",
"name": "cosplayinrussia", "name": "cosplayinrussia",
"nick": "Косплей | Cosplay 18+", "nick": "Косплей | Cosplay 18+",
}, },

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2022 Mike Fährmann # Copyright 2022-2023 Mike Fährmann
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as # it under the terms of the GNU General Public License version 2 as
@ -111,13 +111,15 @@ class ZerochanTagExtractor(ZerochanExtractor):
test = ("https://www.zerochan.net/Perth+%28Kantai+Collection%29", { test = ("https://www.zerochan.net/Perth+%28Kantai+Collection%29", {
"pattern": r"https://static\.zerochan\.net/.+\.full\.\d+\.(jpg|png)", "pattern": r"https://static\.zerochan\.net/.+\.full\.\d+\.(jpg|png)",
"count": "> 24", "count": "> 24",
"keywords": { "keyword": {
"extension": r"re:jpg|png", "extension": r"re:jpg|png",
"file_url": "", "file_url": r"re:https://static\.zerochan\.net"
"filename": r"re:Perth.\(Kantai.Collection\).full.\d+", r"/.+\.full\.\d+\.(jpg|png)",
"filename": r"re:(Perth\.\(Kantai\.Collection\)"
r"|Kantai\.Collection)\.full\.\d+",
"height": r"re:^\d+$", "height": r"re:^\d+$",
"id": r"re:^\d+$", "id": r"re:^\d+$",
"name": "Perth (Kantai Collection)", "name": r"re:(Perth \(Kantai Collection\)|Kantai Collection)",
"search_tags": "Perth (Kantai Collection)", "search_tags": "Perth (Kantai Collection)",
"size": r"re:^\d+k$", "size": r"re:^\d+k$",
"width": r"re:^\d+$", "width": r"re:^\d+$",

Loading…
Cancel
Save