and/or statements in scraper logic

68 views
Skip to first unread message

Wayne Badcock

unread,
Nov 28, 2017, 6:46:37 AM11/28/17
to Web Scraper
Hi

This is a daft question and may not be possible. Does anybody know if you can apply an and/or condition to a table element selector?

So at the moment I have a selector that looks like: 

      table.normal tr:contains('Event Cover Starts:') td:nth-of-type(2) 

to get the value in the field after that one, e.g. the start time

But for some people 'Event Cover Starts:' is something completely different, for example 'Start Time:' so I was trying to do where tr contains 'Event Cover Starts:' or 'Start Time:'

Many thanks. 

Denis Bakhtenkov

unread,
Nov 28, 2017, 8:45:06 AM11/28/17
to Web Scraper
Hi,

CSS selectors do not support and/or logic, but you can use several different selectors together through a comma, for example:

table.normal tr:contains('Event Cover Starts:') td:nth-of-type(2), table.normal tr:contains('Start Time:') td:nth-of-type(2)



вторник, 28 ноября 2017 г., 14:46:37 UTC+3 пользователь Wayne Badcock написал:

RT van

unread,
Dec 4, 2017, 5:17:32 AM12/4/17
to Web Scraper
This works, but it creates 2 separate rows (records) in the database. Is it possible  to create one database record with 'Event Cover Starts:' and 'Start Time:' in one row?
Reply all
Reply to author
Forward
0 new messages