| |
---|
Overview | |
chromedp in api-tools in main.go : runs all the scrapers. we’ll be looking at scrapeCoursebook | initChromeDp first, allocator sets up browser
RunResponse runs a set of actions on the context
use RunResponse to log in with your netID and password to scrape without being rate limited ClearBrowserCookies (using ActionFunc which is like a custom action) to get a new token at the start of each new prefix which resets your rate limit
get headers from with cookies to use in later requests
make a new request to coursebooks’s behind-the-scenes url for each course (this reverse engineering makes scraping faster and easier, don’t have to click thru so many dropdowns/buttons) Currently coursebook scraping is not working because the scraper isn’t able to log in
|
Questions | |
chromedp docs overview | lots of types Actions don’t have much in common, just the Do function since we’re calling functions and passing their results into RunResponse you can use anything that returns an Action query Actions: find things in the page that match a certain pattern Query Options By Options Node Options
|
Questions | |
Next meetin | |