Nandhu
Nandhu

Reputation: 23

Puppeteer - The webpage I am scraping isnt displaying the correct data

I am trying to scrap class availability on my colleges website using puppeteer. I successfully did it with selenium but I am having trouble with puppeteer. When I click enter on the form, the next page is blank regardless of what I input.

what it shows when i browse myself

what it shows when i use puppeteer

Heres the code I used, it just opens the website, selects the semester and class number and presses enter:

const puppeteer = require('puppeteer')
async function start() {
    const browser = await puppeteer.launch({headless:false})
    var [page] = await browser.pages();
    await page.goto("https://usfweb.usf.edu/DSS/StaffScheduleSearch")
    await page.select('#P_SEMESTER', "202208")
    await page.type("#P_REF", "81151")
    await page.click("button[value='Search']")
}
start()

It works in selenium, and i tried opening the website on chromium and it works there to. Thank you to anyone who gives advice!

Upvotes: 2

Views: 333

Answers (1)

Reza Salari
Reza Salari

Reputation: 131

I tested your code and the output was exactly the same as what you were seeing in the browser everything all right iChromium or puppeteer versions are probably not compatible with each other

puppeteer Version : "^16.1.0" chrome version : Version 104.0.5112.81

Upvotes: 1

Related Questions