[booru] unquote tags to fix multiple tags in urls

pull/13/head
Mike Fährmann 10 years ago
parent f2c68a5753
commit 2a7dbd8868

@ -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…
Cancel
Save