Limit cyanideandhappiness filename length
This commit is contained in:
parent
9172aba146
commit
d9edeb1343
1 changed files with 3 additions and 0 deletions
|
@ -435,10 +435,13 @@ class CyanideAndHappiness(_BasicScraper):
|
||||||
self.stripUrl % "3360", # video
|
self.stripUrl % "3360", # video
|
||||||
self.stripUrl % "3367", # video
|
self.stripUrl % "3367", # video
|
||||||
self.stripUrl % "3382", # video
|
self.stripUrl % "3382", # video
|
||||||
|
self.stripUrl % "3421", # video
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def namer(cls, imageUrl, pageUrl):
|
def namer(cls, imageUrl, pageUrl):
|
||||||
imgname = imageUrl.split('/')[-1]
|
imgname = imageUrl.split('/')[-1]
|
||||||
|
# only get the first 100 chars for the image name
|
||||||
|
imgname = imgname[:100]
|
||||||
imgnum = pageUrl.split('/')[-2]
|
imgnum = pageUrl.split('/')[-2]
|
||||||
return '%s_%s' % (imgnum, imgname)
|
return '%s_%s' % (imgnum, imgname)
|
||||||
|
|
Loading…
Reference in a new issue