From e040dd0d505dce61d3eb22f0c088fe920bfbff01 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Tue, 9 Apr 2013 19:38:16 +0200 Subject: [PATCH] Added Science. --- doc/changelog.txt | 4 ++-- dosagelib/plugins/s.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index a7cd51bac..77321d46c 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,8 +1,8 @@ Dosage 2.0 (released xx.xx.2013) Features: -- comics: Added ExtraOrdinary, GoblinsComic, RealmOfAtland, SnowFlakes, - StuffNoOneToldMe and WebDesignerCOTW. +- comics: Added ExtraOrdinary, GoblinsComic, RealmOfAtland, Science, + SnowFlakes, StuffNoOneToldMe and WebDesignerCOTW. - comics: Added the --vote option to vote for popular comics. Changes: diff --git a/dosagelib/plugins/s.py b/dosagelib/plugins/s.py index 75e1dc13c..c127a7f96 100644 --- a/dosagelib/plugins/s.py +++ b/dosagelib/plugins/s.py @@ -87,6 +87,16 @@ class Schuelert(_BasicScraper): lang = 'de' +class Science(_BasicScraper): + url = 'http://sci-ence.org/' + stripUrl = url + '%s/' + firstStripUrl = stripUrl % 'periodic-table-element-ass' + prevSearch = compile(tagre("a", "href", r'(http://sci-ence\.org/[^"]+/)', after="prev")) + imageSearch = compile(tagre("img", "src", r'(http://sci-ence\.org/comics/\d+-\d+-\d+[^"]+)')) + help = 'Index format: stripname' + description = u'A comic about science, technology, skepticism, geekery, video games, atheism, and more.' + + class SequentialArt(_BasicScraper): url = 'http://www.collectedcurios.com/sequentialart.php' stripUrl = url + '?s=%s'