Improve CtrlAltDel image names.

This commit is contained in:
Bastian Kleineidam 2013-04-25 19:01:21 +02:00
parent a26fcfa4b6
commit aca3c959af

View file

@ -323,6 +323,14 @@ class CtrlAltDel(_BasicScraper):
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="nav-back")) prevSearch = compile(tagre("a", "href", r'([^"]+)', after="nav-back"))
help = 'Index format: yyyymmdd' help = 'Index format: yyyymmdd'
@classmethod
def namer(cls, imageUrl, pageUrl):
"""Remove random junk from image names."""
imgname = imageUrl.split('/')[-1]
imgbase = imgname.rsplit('-', 1)[0]
imgext = imgname.rsplit('.', 1)[1]
return '%s.%s' % (imgbase, imgext)
class CtrlAltDelSillies(CtrlAltDel): class CtrlAltDelSillies(CtrlAltDel):
name = 'CtrlAltDel/Sillies' name = 'CtrlAltDel/Sillies'