@@ -98,7 +98,7 @@ class FuraffinityExtractor(Extractor):
|
|||||||
data["tags"] = text.split_html(extr(
|
data["tags"] = text.split_html(extr(
|
||||||
'class="tags-row">', '</section>'))
|
'class="tags-row">', '</section>'))
|
||||||
data["title"] = text.unescape(extr("<h2><p>", "</p></h2>"))
|
data["title"] = text.unescape(extr("<h2><p>", "</p></h2>"))
|
||||||
extr('title=', '"')
|
data["artist_url"] = extr('title="', '"').strip()
|
||||||
data["artist"] = extr(">", "<")
|
data["artist"] = extr(">", "<")
|
||||||
data["_description"] = extr(
|
data["_description"] = extr(
|
||||||
'class="submission-description user-submitted-links">',
|
'class="submission-description user-submitted-links">',
|
||||||
@@ -122,7 +122,7 @@ class FuraffinityExtractor(Extractor):
|
|||||||
else:
|
else:
|
||||||
# old site layout
|
# old site layout
|
||||||
data["title"] = text.unescape(extr("<h2>", "</h2>"))
|
data["title"] = text.unescape(extr("<h2>", "</h2>"))
|
||||||
extr('title=', '"')
|
data["artist_url"] = extr('title="', '"').strip()
|
||||||
data["artist"] = extr(">", "<")
|
data["artist"] = extr(">", "<")
|
||||||
data["fa_category"] = extr("<b>Category:</b>", "<").strip()
|
data["fa_category"] = extr("<b>Category:</b>", "<").strip()
|
||||||
data["theme"] = extr("<b>Theme:</b>", "<").strip()
|
data["theme"] = extr("<b>Theme:</b>", "<").strip()
|
||||||
@@ -141,7 +141,6 @@ class FuraffinityExtractor(Extractor):
|
|||||||
'style="padding:8px">', ' </td>')
|
'style="padding:8px">', ' </td>')
|
||||||
data["folders"] = () # folders not present in old layout
|
data["folders"] = () # folders not present in old layout
|
||||||
|
|
||||||
data["artist_url"] = data["artist"].replace("_", "").lower()
|
|
||||||
data["user"] = self.user or data["artist_url"]
|
data["user"] = self.user or data["artist_url"]
|
||||||
data["date"] = text.parse_timestamp(data["filename"].partition(".")[0])
|
data["date"] = text.parse_timestamp(data["filename"].partition(".")[0])
|
||||||
data["description"] = self._process_description(data["_description"])
|
data["description"] = self._process_description(data["_description"])
|
||||||
|
|||||||
@@ -159,6 +159,17 @@ __tests__ = (
|
|||||||
"width" : 488,
|
"width" : 488,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.furaffinity.net/view/46163989/",
|
||||||
|
"#comment" : "display names (#7115 #7123)",
|
||||||
|
"#category": ("", "furaffinity", "post"),
|
||||||
|
"#class" : furaffinity.FuraffinityPostExtractor,
|
||||||
|
|
||||||
|
"artist" : "Pickra the magical feline",
|
||||||
|
"artist_url": "pickra",
|
||||||
|
"user" : "pickra",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://www.furaffinity.net/view/57587562",
|
"#url" : "https://www.furaffinity.net/view/57587562",
|
||||||
"#comment" : "login required",
|
"#comment" : "login required",
|
||||||
|
|||||||
Reference in New Issue
Block a user