lib/insta_scraper/html/account.rb in insta_scraper-0.3.0 vs lib/insta_scraper/html/account.rb in insta_scraper-0.4.0

- old
+ new

@@ -1,17 +1,19 @@ module InstaScraper class HTML::Account < InstaScraper::HTML - attr_reader :username + attr_reader :username, + :params - def initialize(username = nil, html = nil) + def initialize(username = nil, html = nil, params = {}) raise ArgumentError, 'Provide a username or html string' if !username && !html @username = username @html = html + @params = params end def url - "https://www.instagram.com/#{username}/" + "https://www.instagram.com/#{username}/#{serialize_params}" end def data @data ||= Hashie::Mash.new(::JSON.parse(shared_data))