add extractor 'yandere'

This commit is contained in:
Mike Fährmann
2015-04-15 17:35:30 +02:00
parent 07f23dc2fa
commit 762ad7426a
2 changed files with 32 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ from .common import Message
from .common import filename_from_url
import xml.etree.ElementTree as ET
import json
import os.path
import urllib.parse
@@ -55,7 +56,10 @@ class BooruExtractor(SequentialExtractor):
def get_file_metadata(self, data):
"""Collect metadata for a downloadable file"""
data["category"] = self.info["category"]
data["name"] = filename_from_url(self.get_file_url(data))
data["name"] = urllib.parse.unquote(
filename_from_url(self.get_file_url(data))
)
data["extension"] = os.path.splitext(data["name"])[1][1:]
return data
def get_file_url(self, data):