Class: MangafoxCrawler
Instance Attribute Summary
Attributes inherited from MangaCrawler
#parsed_html, #url
Class Method Summary
collapse
Instance Method Summary
collapse
#chapters, #initialize
Constructor Details
This class inherits a constructor from MangaCrawler
Class Method Details
.chapter_class ⇒ Object
48
49
50
|
# File 'lib/yamd/mangafox.rb', line 48
def self.chapter_class
MangafoxChapter
end
|
Instance Method Details
#chapters_info ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/yamd/mangafox.rb', line 36
def chapters_info
@parsed_html.css('#chapters ul li div').reverse.map do | chapter_link |
name = chapter_link.at_css('a.tips').text
span_with_real_name = chapter_link.at_css('a.tips + span')
name = name + ' - ' + span_with_real_name.text if span_with_real_name
{ name: name,
url: chapter_link.at_css('a.tips')['href']
}
end
end
|
#name ⇒ Object
52
53
54
|
# File 'lib/yamd/mangafox.rb', line 52
def name
@parsed_html.at_css('h1').text.match(/(.+) Manga/)[1]
end
|