Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

### Step To Reproduce / Observed behavior #330

Closed
thongao1302 opened this issue Apr 19, 2024 · 0 comments
Closed

### Step To Reproduce / Observed behavior #330

thongao1302 opened this issue Apr 19, 2024 · 0 comments

Comments

@thongao1302
Copy link

Step To Reproduce / Observed behavior

class YahooFinanceScrapper
  def initialize(symbol)
    @symbol = symbol
    @base_url = "https://finance.yahoo.com/quote/"
  end

  def parse
    Puppeteer.launch(headless: true) do |browser|
      page = browser.pages.first || browser.new_page
      page.viewport = Puppeteer::Viewport.new(width: 1280, height: 800)
      page.goto(@base_url + @symbol, wait_until: 'domcontentloaded')

      byebug

      h1 = page.query_selector("div#quote-header-info h1")
    end
  end
end

When running page.query_selector("div#quote-header-info h1") or page.query_selector("body") I'm getting *** RuntimeError Exception: Bug of puppeteer-ruby...

Expected behavior

Retrieve the element

Environment

Development

Paste the output of ruby --version: ruby 3.2.1

Originally posted by @siba2893 in #322

@thongao1302 thongao1302 closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant