Better image filename for CyanideAndHappiness
This commit is contained in:
parent
7701b2531a
commit
d54d787af1
2 changed files with 12 additions and 2 deletions
|
@ -4,6 +4,9 @@ Features:
|
|||
- comics: Added AmazingSuperPowers strip.
|
||||
- comics: Added PandyLand strip.
|
||||
|
||||
Changes:
|
||||
- comics: CyanideAndHappiness image filename now has the strip number prefixed.
|
||||
|
||||
Fixes:
|
||||
- scripts: Ensure the generated comic names do not exceed 100 characters so they do
|
||||
not cause problems with path length restrictions.
|
||||
|
|
|
@ -179,12 +179,19 @@ class CatAndGirl(_BasicScraper):
|
|||
|
||||
|
||||
class CyanideAndHappiness(_BasicScraper):
|
||||
latestUrl = 'http://www.explosm.net/comics/'
|
||||
stripUrl = latestUrl + '%s/'
|
||||
_latestUrl = 'http://www.explosm.net/comics/'
|
||||
starter = bounceStarter(_latestUrl, compile(tagre("a", "href", r"(/comics/\d+/)", before="next")))
|
||||
stripUrl = _latestUrl + '%s/'
|
||||
imageSearch = compile(tagre("img", "src", r'(http://(?:www\.)?explosm\.net/db/files/Comics/[^"]+)'))
|
||||
prevSearch = compile(tagre("a", "href", r'(/comics/\d+/)', before="prev"))
|
||||
help = 'Index format: n (unpadded)'
|
||||
|
||||
@classmethod
|
||||
def namer(cls, imageUrl, pageUrl):
|
||||
imgname = imageUrl.split('/')[-1]
|
||||
imgnum = pageUrl.split('/')[-2]
|
||||
return '%s_%s' % (imgnum, imgname)
|
||||
|
||||
|
||||
class CrimsonDark(_BasicScraper):
|
||||
latestUrl = 'http://www.davidcsimon.com/crimsondark/'
|
||||
|
|
Loading…
Reference in a new issue