All scrapers must have an URL.
This commit is contained in:
parent
6244ab9af6
commit
cafa37fcb1
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ from ..util import tagre, getPageContent
|
|||
|
||||
class SabrinaOnline(_BasicScraper):
|
||||
description = u'Skunks, computers and porn'
|
||||
baseUrl = 'http://sabrina-online.com/'
|
||||
url = 'http://sabrina-online.com/'
|
||||
imageSearch = compile(tagre("a", "href", r'(strips/[^"]*)'))
|
||||
prevSearch = compile(tagre("a", "href", r"(\d\d\d\d-\d\d.html)") +
|
||||
tagre("img", "src", "b_back.gif"))
|
||||
|
@ -22,11 +22,11 @@ class SabrinaOnline(_BasicScraper):
|
|||
@classmethod
|
||||
def starter(cls):
|
||||
"""Pick last one in a list of archive pages."""
|
||||
url = cls.baseUrl + 'archive.html'
|
||||
data, baseUrl = getPageContent(url, cls.session)
|
||||
archive = cls.url + 'archive.html'
|
||||
data = getPageContent(archive, cls.session)[0]
|
||||
search = compile(tagre("a", "href", r"(\d\d\d\d-\d\d.html)"))
|
||||
archivepages = search.findall(data)
|
||||
return cls.baseUrl + archivepages[-1]
|
||||
return cls.url + archivepages[-1]
|
||||
|
||||
|
||||
class SailorsunOrg(_BasicScraper):
|
||||
|
|
Loading…
Reference in a new issue