class Apollo::Crawler::XkcdCrawler

Public Instance Methods

extract_data(doc) click to toggle source
# File lib/apollo_crawler/crawler/xkcd_crawler.rb, line 36
def extract_data(doc)
        res = doc.xpath(@@MATCHER_ITEM).map { |node|
                { 
                        :text => node['title'],
                        :link => URI.join(self.url, node['src']).to_s
                }
        }
end
name() click to toggle source
# File lib/apollo_crawler/crawler/xkcd_crawler.rb, line 28
def name()
        return "Xkcd"
end
url() click to toggle source
# File lib/apollo_crawler/crawler/xkcd_crawler.rb, line 32
def url()
        return "http://xkcd.com/"
end