class Taaze::TaazeBooktags
This class get the product id as an input return a list of tags Sample input with product id : 11100763252 Sample output ['轉型正義', '白色恐怖', '社會科學', '臺灣民主運動']
Constants
- BOOKS_URL
Public Class Methods
new(book_id)
click to toggle source
# File lib/taaze/tags.rb, line 13 def initialize(book_id) parse_html(book_id) end
Public Instance Methods
Private Instance Methods
parse_html(book_id)
click to toggle source
parse the html
# File lib/taaze/tags.rb, line 25 def parse_html(book_id) url = BOOKS_URL + book_id @document = Nokogiri::HTML(open(url)) end