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

LONG hang when a page is not available #14

Open
cguess opened this issue Aug 16, 2022 · 1 comment
Open

LONG hang when a page is not available #14

cguess opened this issue Aug 16, 2022 · 1 comment

Comments

@cguess
Copy link
Collaborator

cguess commented Aug 16, 2022

When there's no post found i.e. https://www.instagram.com/p/sfhslsfjdls/ it hangs for awhile looking for elements. Let's figure out a bit faster way to figure that out.

@oneroyalace
Copy link
Contributor

A page.title check might be quick. The check might fail if Instagram changed its content-not-found page, but if that happens, worst case we wait for the 60 second timeout here: https://github.com/cguess/zorki/blob/5b08badcf927cf0423abf94a2d2f2bd5541c310d/lib/zorki/scrapers/scraper.rb#L87

We could also change the line above to read return if find_field("Search", wait: n).present?. I've never run into trouble setting n at 15

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

2 participants