Socket
Book a DemoInstallSign in
Socket

guc-cms-scrapper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

guc-cms-scrapper

A package to scrap the GUC university CMS to get the courses and their details

0.2.5
pipPyPI
Maintainers
1

GUC CMS Scrapper

A Python package to scrape the German University in Cairo (GUC) Course Management System (CMS) to retrieve courses and their details.

Installation

Pip

pip install guc-cms-scrapper

Poetry

poetry add guc-cms-scrapper

Usage

Authentication

from guc_cms_scrapper import GucCmsScrapper

# Initialize the scrapper with your GUC credentials
scrapper = GucCmsScrapper(username='<your guc username>', password='<your guc password>')

Getting Course List

# Fetch all available courses
courses = scrapper.get_courses()

for course in courses:
  print(f"Course: {course.name}")
  print(f"Code: {course.code}")
  print(f"ID: {course.id}")
  print(f"Semester: {course.semester}")
  print("---")

Getting Course Data

# Fetch detailed data for a specific course
course_data = scrapper.get_course_data(course_id="12345", semester="52")

# Access course announcements
print(course_data.announcements)

# Access weekly content
for week in course_data.weeks:
  print(f"\nWeek starting {week.start_date}")
  print(f"Description: {week.description}")
  
  for item in week.items:
    print(f"Title: {item.title}") # 1 - Practice Assignment 3
    print(f"Clean Title: {item.clean_title}") # Practice Assignment 3 (without the leading number)
    print(f"Type: {item.type}") # Lecture, Assignment, Solution, Other
    print(f"Description: {item.description}")
    print(f"URL: {item.url}")

Development

Pre-requisites

  • Python
  • Poetry

Useful Commands

  • Build and Publish to PyPi (You need to be logged in to PyPi, see here)
poetry publish --build

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.