diff --git a/README.md b/README.md index f54dd41..05089a5 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Dhalang::Screenshot.get_from_url("https://www.google.com", :webp) ### Scraping ```ruby -Dhalang::Scraper.get_from_url("https://www.google.com") +Dhalang::Scraper.scrape("https://www.google.com") ``` # Custom PDF/screenshot options diff --git a/lib/Scraper.rb b/lib/Scraper.rb index 0416f76..b11aa74 100644 --- a/lib/Scraper.rb +++ b/lib/Scraper.rb @@ -10,7 +10,7 @@ class Scraper # @param [Hash] options User configurable options. # # @return [String] The html content of the page. - def self.get_from_url(url, options = {}) + def self.scrape(url, options = {}) UrlUtils.validate(url) configuration = PuppeteerConfiguration.new(url, options) return NodeScriptInvoker.execute_script_and_read_stdout(SCRIPT_PATH, configuration.json)