title: Pyppeteer: how to extract text from div element on Linux (Ubuntu 16.04)?
body: <p>Given HTML snippet: <code>&lt;div id=&quot;gs_ab_md&quot;&gt;&lt;div class=&quot;gs_ab_mdw&quot;&gt;About 3,260 results&lt;/div&gt;&lt;/div&gt;</code>. It works on Windows however it does not work on Linux (Ubuntu 16.04). I've already installed following extra packages mentioned here: <a href="https://stackoverflow.com/questions/66716829/why-does-this-pyppeteer-code-only-work-on-windows">Why does this pyppeteer code only work on windows?</a> . Any idea?</p>
  <pre><code>import pyppeteer
  from pyppeteer import launch
  
  async def main():
      browser = await launch({
          'headless': True
      })
      page = await browser.newPage()
      await page.goto('WEBPAGE_URL')
      element = await page.querySelector('#gs_ab_md .gs_ab_mdw')
      title = await page.evaluate('(element) =&gt; element.textContent', element)
      print(title)
      await browser.close()
  
  asyncio.get_event_loop().run_until_complete(main())
  </code></pre>
  <p>Execution ends with the following error:</p>
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):
    File &quot;p.py&quot;, line 16, in &lt;module&gt;
      asyncio.get_event_loop().run_until_complete(main())
    File &quot;/usr/lib/python3.8/asyncio/base_events.py&quot;, line 616, in run_until_complete
      return future.result()
    File &quot;p.py&quot;, line 7, in main
      browser = await launch({'headless': True})
    File &quot;/home/developer/.local/lib/python3.8/site-packages/pyppeteer/launcher.py&quot;, line 306, in launch
      return await Launcher(options, **kwargs).launch()
    File &quot;/home/developer/.local/lib/python3.8/site-packages/pyppeteer/launcher.py&quot;, line 167, in launch
      self.browserWSEndpoint = get_ws_endpoint(self.url)
    File &quot;/home/developer/.local/lib/python3.8/site-packages/pyppeteer/launcher.py&quot;, line 226, in get_ws_endpoint
      raise BrowserError('Browser closed unexpectedly:\n')
  pyppeteer.errors.BrowserError: Browser closed unexpectedly:
  </code></pre>