i was wondering if it were possible modify the if/while premade to skip extraction if a certain string of text or a certain kind is found. i have a scrape (the one you guys have helped me on a bunch) that goes through a list of resorts (extracted from a page as links) checking for new reservations. if new reservations are found, it goes to the link for the new reservation and extracts the data. if no new reservations are found, it goes to the next resort and repeats the process of checking for new reservations. the thing is, if there are no new reservations, one of two things will happen.
1. out of the list of reservations, no new ones are found and it proceeds automatically to the next resort.
2. a message will be displayed instead of a list of reservations just saying "No bookings found for that time period"
so i'm trying to figure out if it would be possible to add in a step when it goes to list the reservations that says if that text is found (could be set up as a kind), then skip to the next resort. I have a "force select" premade in there right now because the page load is AJAX, so sometimes it can take up to 7 seconds to load the content. so it waits to extract until the list of reservations appears with the timeout set to 10 seconds.
i made a picture to help explain it a bit more:
if text is found, than skip extraction
Re: if text is found, than skip extraction
If I understand correctly, the 1st case, when no new reservations are found, is already taken care of and you need to skip it on case 2. Also, the message can take a while to show up. What you can do is create a kind that selects the message and then add a Force Select that selects this message with the Ignore if not found after timeout option checked. Then add an If / While action that runs the child actions only if the message is not found and put all your extraction actions inside this If / While.
Juan Soldi
The Helium Scraper Team
The Helium Scraper Team
-
- Posts: 38
- Joined: Tue Dec 11, 2012 6:44 pm
Re: if text is found, than skip extraction
works perfect! thank you so much, again