Store large xkcd images.
This commit is contained in:
parent
0e5c59133c
commit
c583e8717e
2 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,8 @@ Features:
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
- comics: Fixed ForLackOfABetterComic.
|
- comics: Fixed ForLackOfABetterComic.
|
||||||
|
- comics: Store large xkcd images if available.
|
||||||
|
Closes: GH bug #43
|
||||||
|
|
||||||
|
|
||||||
Dosage 2.7 (released 24.11.2013)
|
Dosage 2.7 (released 24.11.2013)
|
||||||
|
|
|
@ -26,3 +26,9 @@ class xkcd(_BasicScraper):
|
||||||
index = int(pageUrl.rstrip('/').rsplit('/', 1)[-1])
|
index = int(pageUrl.rstrip('/').rsplit('/', 1)[-1])
|
||||||
name = imageUrl.rsplit('/', 1)[-1].split('.')[0]
|
name = imageUrl.rsplit('/', 1)[-1].split('.')[0]
|
||||||
return '%03d-%s' % (index, name)
|
return '%03d-%s' % (index, name)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def imageUrlModifier(cls, url, data):
|
||||||
|
if url and '/large/' in data:
|
||||||
|
return url.replace(".png", "_large.png")
|
||||||
|
return url
|
||||||
|
|
Loading…
Reference in a new issue