Skip to content

Commit

Permalink
[Refactor:InstructorUI] Remove driver.get(current url) (#31)
Browse files Browse the repository at this point in the history
In `getStudentInfoFromCourseHelper`, the photo scraper currently has the
following line:
```
        img_url = driver.current_url
        driver.get(img_url)
```
`img_url` is used nowhere else in the function, so it appears that this
statement doesn't do anything, and probably slows down the scraper a
little by running an unnecessary Selenium command.
  • Loading branch information
powe97 authored Aug 15, 2024
1 parent 3892767 commit 7934520
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions PhotoScraper/RPI_SIS_PhotoScraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,6 @@ def getStudentInfoFromCourseHelper(driver, term, class_list):
input()
raise

img_url = driver.current_url
driver.get(img_url)

# image, initalize to empty string
student_record["img url"] = ""
image_arr = driver.find_elements(By.TAG_NAME, "img")
Expand Down

0 comments on commit 7934520

Please sign in to comment.