Skip to content

Commit

Permalink
fix: set timeout in fetch_course
Browse files Browse the repository at this point in the history
  • Loading branch information
orkr3426 committed Feb 6, 2025
1 parent 6278290 commit b941f5c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/agents/scrapers/university_of_british_columbia.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ async def fetch_courses(self) -> CourseListingModel:
"width": 500,
"height": 800,
})

page.set_default_timeout = 60000
page.set_default_navigation_timeout = 60000

await page.goto(self.base_url)
await page.wait_for_selector('#subjects-table')
pagination = (await page.locator('.MuiTablePagination-displayedRows').inner_html()).split(' of')
Expand Down Expand Up @@ -151,8 +155,10 @@ async def fetch_courses_e(self, page, pageNum) -> CourseListingModel:
"width": 500,
"height": 800,
})

page.set_default_timeout = 60000
page.set_default_navigation_timeout = 60000

await page.goto(self.base_url)
await self.setupPage(page, pageNum)

Expand Down

0 comments on commit b941f5c

Please sign in to comment.