mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-21 18:22:30 +01:00
[booru] unquote tags to fix multiple tags in urls
This commit is contained in:
parent
f2c68a5753
commit
2a7dbd8868
4
config
4
config
@ -21,5 +21,5 @@ regex0 = (?:https?://)?(?:www\.)?imgbox\.com(/.*)
|
||||
regex0 = (?:https?://)?(?:www\.)?imagebam\.com/(gallery|image)/([^/]+).*
|
||||
|
||||
[e621]
|
||||
regex0 = (?:https?://)?(?:www\.)?e621\.net/post/index/\d+/(\w+)
|
||||
regex1 = e(?:621)?[.:-_](\w.+)
|
||||
regex0 = (?:https?://)?(?:www\.)?e621\.net/post/index/\d+/([^?]+)
|
||||
regex1 = e(?:621)?[.:-_](\w.+)
|
||||
|
@ -1,12 +1,13 @@
|
||||
from .common import AsyncExtractor
|
||||
from ..util import filename_from_url
|
||||
import xml.etree.ElementTree as ET
|
||||
import urllib.parse
|
||||
|
||||
class BooruExtractor(AsyncExtractor):
|
||||
|
||||
def __init__(self, match, config):
|
||||
AsyncExtractor.__init__(self, config)
|
||||
self.tags = match.group(1)
|
||||
self.tags = urllib.parse.unquote(match.group(1))
|
||||
self.category = "booru"
|
||||
self.params = {"tags": self.tags}
|
||||
self.page = "page"
|
||||
@ -18,7 +19,6 @@ class BooruExtractor(AsyncExtractor):
|
||||
root = ET.fromstring(
|
||||
self.request(self.api_url, verify=True, params=self.params).text
|
||||
)
|
||||
# root = tree.getroot()
|
||||
if len(root) == 0:
|
||||
return
|
||||
for item in root:
|
||||
|
Loading…
Reference in New Issue
Block a user