const flightData = await page.$eval('.available-flights .available-flight.row:not([style*="display:none"]):not([style*="display: none"])', (elements) => { // code to handle rows }

只选择显示的元素并使用该数据。