Created
March 19, 2020 04:40
-
-
Save hoefler02/6fe346b74c1c7a2bb0b9f316e3c84a70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Schoology Web Scraper | |
# Pulls grades from https://schoology.com | |
from bs4 import BeautifulSoup | |
import requests | |
response = requests.get('https://schoology.com/grades/grades', headers={'cookie': 'your_cookie_goes_here'}) | |
soup = BeautifulSoup(response.content, 'html.parser') | |
grades = [] | |
for item in soup.find_all('span', attrs={'class':'course-grade-value'}): | |
if not item.get_text() == "N/A": | |
grades.append(item.get_text()) | |
print('\n'.join(grades)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment