Skip CyanideAndHappiness videos
This commit is contained in:
parent
875e431edc
commit
f50ef910be
1 changed files with 4 additions and 10 deletions
|
@ -99,7 +99,7 @@ class CatAndGirl(_BasicScraper):
|
||||||
prevSearch = compile(tagre("a", "href", r'([^"]+)')+r"[^<]+Previous</a>")
|
prevSearch = compile(tagre("a", "href", r'([^"]+)')+r"[^<]+Previous</a>")
|
||||||
help = 'Index format: n (unpadded)'
|
help = 'Index format: n (unpadded)'
|
||||||
|
|
||||||
def shouldSkipUrl(self, url):
|
def shouldSkipUrl(self, url, data):
|
||||||
"""Skip pages without images."""
|
"""Skip pages without images."""
|
||||||
return url in (
|
return url in (
|
||||||
self.stripUrl % '4299',
|
self.stripUrl % '4299',
|
||||||
|
@ -403,7 +403,7 @@ class Curvy(_BasicScraper):
|
||||||
compile(tagre("a", "href", r'(/\?date=\d+)') +
|
compile(tagre("a", "href", r'(/\?date=\d+)') +
|
||||||
tagre("img", "src", "/nav/next\.png")))
|
tagre("img", "src", "/nav/next\.png")))
|
||||||
|
|
||||||
def shouldSkipUrl(self, url):
|
def shouldSkipUrl(self, url, data):
|
||||||
"""Skip pages without images."""
|
"""Skip pages without images."""
|
||||||
return url in (
|
return url in (
|
||||||
self.stripUrl % '20130402',
|
self.stripUrl % '20130402',
|
||||||
|
@ -419,15 +419,9 @@ class CyanideAndHappiness(_BasicScraper):
|
||||||
prevSearch = compile(tagre("a", "href", r'(/comics/\d+/)', before="prev"))
|
prevSearch = compile(tagre("a", "href", r'(/comics/\d+/)', before="prev"))
|
||||||
help = 'Index format: n (unpadded)'
|
help = 'Index format: n (unpadded)'
|
||||||
|
|
||||||
def shouldSkipUrl(self, url):
|
def shouldSkipUrl(self, url, data):
|
||||||
"""Skip pages without images."""
|
"""Skip pages without images."""
|
||||||
return url in (
|
return "/comics/play-button.png" in data
|
||||||
self.stripUrl % "3082",
|
|
||||||
self.stripUrl % "3360", # video
|
|
||||||
self.stripUrl % "3367", # video
|
|
||||||
self.stripUrl % "3382", # video
|
|
||||||
self.stripUrl % "3421", # video
|
|
||||||
)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def namer(cls, imageUrl, pageUrl):
|
def namer(cls, imageUrl, pageUrl):
|
||||||
|
|
Loading…
Reference in a new issue