[wikimedia] handle 'File:' paths
This commit is contained in:
@@ -34,7 +34,8 @@ class WikimediaExtractor(BaseExtractor):
|
|||||||
prefix = pre.lower() if sep else None
|
prefix = pre.lower() if sep else None
|
||||||
|
|
||||||
self.title = path = text.unquote(path)
|
self.title = path = text.unquote(path)
|
||||||
self.subcategory = prefix
|
if prefix:
|
||||||
|
self.subcategory = prefix
|
||||||
|
|
||||||
if prefix == "category":
|
if prefix == "category":
|
||||||
self.params = {
|
self.params = {
|
||||||
@@ -42,6 +43,10 @@ class WikimediaExtractor(BaseExtractor):
|
|||||||
"gcmtitle" : path,
|
"gcmtitle" : path,
|
||||||
"gcmtype" : "file",
|
"gcmtype" : "file",
|
||||||
}
|
}
|
||||||
|
elif prefix == "file":
|
||||||
|
self.params = {
|
||||||
|
"titles" : path,
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
self.params = {
|
self.params = {
|
||||||
"generator": "images",
|
"generator": "images",
|
||||||
|
|||||||
Reference in New Issue
Block a user