class Panchira::PixivNovelResolver
Constants
- URL_REGEXP
Public Class Methods
new(url)
click to toggle source
Calls superclass method
# File lib/panchira/resolvers/pixiv_resolver.rb, line 50 def initialize(url) super(url) @novel_id = url.slice(URL_REGEXP, 1) raw_json = URI.parse("https://www.pixiv.net/ajax/novel/#{@novel_id}").read('User-Agent' => user_agent) @json = JSON.parse(raw_json) end
Private Instance Methods
parse_title()
click to toggle source
# File lib/panchira/resolvers/pixiv_resolver.rb, line 60 def parse_title @json['body']['title'] end