From 81821dc45030f85d88ae8d08204ccbd951d94229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sun, 7 Aug 2016 23:21:11 -0400 Subject: [PATCH 1/2] Added Space Junk Arlia comic --- dosagelib/plugins/s.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py index 695351f9a..7fec8f580 100644 --- a/dosagelib/plugins/s.py +++ b/dosagelib/plugins/s.py @@ -383,6 +383,13 @@ class SpaceTrawler(_WordPressScraper): prevSearch = '//a[%s]' % xpath_class('navi-prev') endOfLife = True +class SpaceJunkArlia(_BasicScraper): + url = 'http://spacejunkarlia.com' + stripUrl = url + '/index.php?strip_id=%s' + firstStripUrl = stripUrl % '0' + imageSearch = compile(tagre('img', 'src', r'(comics/[^"]+)')) + prevSearch = compile(tagre('a', 'href', r'(\?strip_id=\d+)') + '<<') + help = 'Index format: number' class Spamusement(_BasicScraper): url = 'http://spamusement.com/' From afcd19bf5b4327b408d8ba019226631337ced5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sun, 7 Aug 2016 23:30:47 -0400 Subject: [PATCH 2/2] Added Prince of Sartar Comic --- dosagelib/plugins/p.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dosagelib/plugins/p.py b/dosagelib/plugins/p.py index 3a63755f5..70d8c169f 100644 --- a/dosagelib/plugins/p.py +++ b/dosagelib/plugins/p.py @@ -203,6 +203,21 @@ class Precocious(_ParserScraper): prevSearch = '//a[img[contains(@src, "/back_arrow")]]' help = 'Index format: yyyy/mm/dd' +class PrinceOfSartar(_WordPressScraper): + url = 'http://www.princeofsartar.com/' + stripUrl = url + 'comic/%s/' + firstStripUrl = stripUrl % 'introduction-chapter-1' + imageSearch = '//div[@id="comic"]//img' + prevSearch = '//a[@class="navi comic-nav-previous navi-prev"]' + nextSearch = '//a[@class="navi comic-nav-next navi-next"]' + starter = bounceStarter + help = 'Index format: name' + + def namer(self, image_url, page_url): + """Use page URL to contruct a unique name.""" + title = page_url.rsplit('/', 2)[1] + image_ext = image_url.rsplit('.', 1)[1] + return '%s.%s' % (title, image_ext) class PS238(_ParserScraper): url = 'http://ps238.nodwick.com/'