Skip to content

Instantly share code, notes, and snippets.

@hoefler02
Created March 19, 2020 04:40
Show Gist options
  • Save hoefler02/6fe346b74c1c7a2bb0b9f316e3c84a70 to your computer and use it in GitHub Desktop.
Save hoefler02/6fe346b74c1c7a2bb0b9f316e3c84a70 to your computer and use it in GitHub Desktop.
# 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