Coder Social home page Coder Social logo

Comments (6)

nlevitt avatar nlevitt commented on May 22, 2024

Ugh. To be clear, there are thumbnail images showing up in the dashboard, it's just that the images are completely black? What about the full size screenshots, are they also black? If so, can you try running brozzle-page http://example.com/... it should log something like this:

2018-04-06 11:06:38,311 90093 INFO MainThread root.on_screenshot(cli.py:192) wrote screenshot to /tmp/http___example_com_-20180406110638.png

Is that image also black?

from brozzler.

ctsrc avatar ctsrc commented on May 22, 2024

Yes, both the thumbnail and the full size screenshot files are black. I did notice after writing this issue though that sometimes the contents of the browser window itself of Chromium is black while the page is loading. Perhaps the screenshot is being taken too soon, before the window has updated with the rendered page?

Here is the output of running brozzle-page http://example.com/:

2018-04-06 21:13:22,416 32392 INFO MainThread brozzler.chrome.Chrome.start(chrome.py:141) running: 'chromium-browser --remote-debugging-port=9222 --use-mock-keychain --user-data-dir=/tmp/tmpni3k2umg/chrome-user-data --disable-background-networking --disable-web-sockets --disable-cache --window-size=1100,900 --no-default-browser-check --disable-first-run-ui --no-first-run --homepage=about:blank --disable-direct-npapi-requests --disable-web-security --disable-notifications --disable-extensions --disable-save-password-bubble about:blank'
2018-04-06 21:13:22,419 32392 INFO MainThread brozzler.chrome.Chrome.start(chrome.py:150) chrome running, pid 32398
2018-04-06 21:13:35,496 32392 INFO MainThread brozzler.chrome.Chrome._websocket_url(chrome.py:172) got chrome window websocket debug url ws://localhost:9222/devtools/page/2A6DEFB09EEA7B6250BA1AFE8B56281C from http://localhost:9222/json
2018-04-06 21:13:36,501 32392 INFO MainThread brozzler.worker.BrozzlerWorker.brozzle_page(worker.py:355) brozzling Page({"id":"e91e3b619453591798bb2cc1a4edf5a3d8bf5dcf","url":"http://example.com/",...})
2018-04-06 21:13:36,506 32392 INFO MainThread brozzler.worker.BrozzlerWorker._try_youtube_dl(worker.py:296) trying youtube-dl on Page({"id":"e91e3b619453591798bb2cc1a4edf5a3d8bf5dcf","url":"http://example.com/",...})
2018-04-06 21:13:37,142 32392 WARNING MainThread youtube_dl.report_warning(YoutubeDL.py:592) Falling back on generic information extractor.
2018-04-06 21:13:37,427 32392 ERROR MainThread youtube_dl.to_stderr(YoutubeDL.py:515) ERROR: Unsupported URL: http://example.com/
2018-04-06 21:13:37,427 32392 INFO MainThread brozzler.worker.BrozzlerWorker.brozzle_page(worker.py:383) needs browsing: Page({"id":"e91e3b619453591798bb2cc1a4edf5a3d8bf5dcf","url":"http://example.com/",...})
2018-04-06 21:13:37,928 32392 INFO MainThread brozzler.browser.Browser.navigate_to_page(browser.py:520) navigating to page http://example.com/
2018-04-06 21:13:38,429 32392 INFO MainThread brozzler.browser.Browser.screenshot(browser.py:552) taking screenshot
2018-04-06 21:13:38,931 32392 INFO MainThread root.on_screenshot(cli.py:191) wrote screenshot to /tmp/http___example_com_-20180406211338.png
2018-04-06 21:13:39,006 32392 INFO MainThread root.behavior_script(__init__.py:103) using template='umbraBehavior.js.j2' populated with parameters={'actions': [{'selector': 'button.sc-button-play, .playButton, div.soundItem, .jwlist>a'}]} for 'http://example.com/'
2018-04-06 21:13:54,010 32392 INFO MainThread brozzler.browser.Browser.run_behavior(browser.py:607) behavior decided it has finished
2018-04-06 21:13:54,010 32392 INFO MainThread brozzler.browser.Browser.extract_outlinks(browser.py:528) extracting outlinks
2018-04-06 21:13:55,516 32392 INFO MainThread root.brozzle_page(cli.py:199) outlinks:
	http://www.iana.org/domains/example
2018-04-06 21:13:55,517 32392 INFO MainThread brozzler.browser.Browser.stop(browser.py:352) shutting down websocket connection
2018-04-06 21:13:55,518 32392 INFO MainThread brozzler.chrome.Chrome.stop(chrome.py:246) terminating chrome pgid 32398
2018-04-06 21:13:56,019 32392 INFO MainThread brozzler.chrome.Chrome.stop(chrome.py:258) chrome pid 32398 exited normally

from brozzler.

ctsrc avatar ctsrc commented on May 22, 2024

As for the image that brozzle-page http://example.com/ was supposed to create, where do I find it? I don't see any new capture in the Brozzler dashboard at http://127.0.0.1:8000/ and I can't find the capture at http://localhost:8880/brozzler/*/http://example.com/ either, and I don't see any new files in the directory I was standing in when I ran brozzle-page http://example.com/.

from brozzler.

ctsrc avatar ctsrc commented on May 22, 2024

I see now that the output said where it put the screenshot, heh.

from brozzler.

ctsrc avatar ctsrc commented on May 22, 2024

http___example_com_-20180406211338

Still black yes.

from brozzler.

nlevitt avatar nlevitt commented on May 22, 2024

No luck reproducing the problem so far. Tried on a mac,
Chromium 65.0.3325.181 Built on Ubuntu , running on Ubuntu 16.04 (using Xvnc)
and Chromium 64.0.3282.119 built on Debian 9.3, running on Debian 9.4 (using normal X with a graphics card and physical screen)

Can you apply this change

diff --git a/brozzler/browser.py b/brozzler/browser.py
index ea0063cbeb..f1814ccf70 100644
--- a/brozzler/browser.py
+++ b/brozzler/browser.py
@@ -461,7 +461,9 @@ class Browser:
                             page_url)
                         self.navigate_to_page(page_url, timeout=page_timeout)
                 if on_screenshot:
-                    self._try_screenshot(on_screenshot)
+                    for i in range(10):
+                        self._try_screenshot(on_screenshot)
+                        time.sleep(1)
                 behavior_script = brozzler.behavior_script(
                         page_url, behavior_parameters,
                         behaviors_dir=behaviors_dir)

run brozzle-page http://example.com/ again, and look at the 10 screenshots produced, to see if they're all black?

from brozzler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.