Fix dilbert filenames.
This commit is contained in:
parent
d7925ba4a2
commit
10eb1ff5ec
1 changed files with 6 additions and 1 deletions
|
@ -99,7 +99,12 @@ class Dilbert(_BasicScraper):
|
||||||
prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev"))
|
prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev"))
|
||||||
imageSearch = compile(tagre("img", "src", r'(/dyn/str_strip/[^"]+\.strip\.zoom\.gif)'))
|
imageSearch = compile(tagre("img", "src", r'(/dyn/str_strip/[^"]+\.strip\.zoom\.gif)'))
|
||||||
help = 'Index format: yyyy-mm-dd'
|
help = 'Index format: yyyy-mm-dd'
|
||||||
# XXX namer
|
|
||||||
|
@classmethod
|
||||||
|
def namer(cls, imageUrl, pageUrl):
|
||||||
|
ext = imageUrl.rsplit(".", 1)[1]
|
||||||
|
name = pageUrl.rsplit("/", 2)[1]
|
||||||
|
return "%s.%s" % (name, ext)
|
||||||
|
|
||||||
|
|
||||||
class DMFA(_BasicScraper):
|
class DMFA(_BasicScraper):
|
||||||
|
|
Loading…
Reference in a new issue