app/models/manga_scraper.rb
#grabs chapter img urls from manganelo 
grabs chapter img urls from manganelo
grabs chapter img urls from manganelo
def chapter_pages(chapter,chapter_id)		
		html = open(chapter)
		doc = Nokogiri::HTML(html)
		chapter_raw = doc.css("img")
		manga_chapter_pages_arr = []
		count = 0
		chapter_raw.each do |item|
			page_hash = {}
			curr_page_url = item.attributes.first.last.value
			page_hash[:page_url] = curr_page_url
			page_hash[:page_number] = count
			page_hash[:chapter_id] = chapter_id
			manga_chapter_pages_arr << page_hash
			count+=1
		end	
		manga_chapter_pages_arr
	end
def chapter_pages ( chapter , chapter_id ) html = open ( chapter ) doc = Nokogiri :: HTML ( html ) chapter_raw = doc . css ( "img" ) manga_chapter_pages_arr = [ ] count = 0 chapter_raw . each do | item | page_hash = { } curr_page_url = item . attributes . first . last . value page_hash [ :page_url ] = curr_page_url page_hash [ :page_number ] = count page_hash [ :chapter_id ] = chapter_id manga_chapter_pages_arr << page_hash count += 1 end manga_chapter_pages_arr end
grabs chapter img urls from manganelo
grabs chapter img urls from manganelo
chapter
<not_specific>
chapter_id
<not_specific>