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

Change some timings and output screenshots for debugging #66

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions roam_to_git/scrapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ def __init__(self,
self.browser = getattr(Browser, browser.upper())
self.browser_args = (browser_args or [])


def download_rr_archive(output_type: str,
output_directory: Path,
config: Config,
slow_motion=10,
):
logger.debug("Creating browser")

browser = Browser(browser=config.browser,
headless=not config.gui,
debug=config.debug,
Expand Down Expand Up @@ -183,7 +183,7 @@ def _download_rr_archive(browser: Browser,

logger.debug("Wait for interface to load")
dot_button = None
for _ in range(100):
for _ in range(40):
# Starting is a little bit slow, so we wait for the button that signal it's ok
time.sleep(config.sleep_duration)
try:
Expand All @@ -202,8 +202,8 @@ def _download_rr_archive(browser: Browser,
logger.error(
"You seems to have multiple databases. Please select it with the option "
"--database")
sys.exit(1)

sys.exit(1)
# await document.screenshot({'path': '/tmp/wait_for_interface_{}.png'.format(output_type) })
assert dot_button is not None, "All roads leads to Roam, but that one is too long. Try " \
"again when Roam servers are faster."

Expand Down