Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guc_cms_scrapper-0.2.5.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

guc_cms_scrapper-0.2.5-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file guc_cms_scrapper-0.2.5.tar.gz.

File metadata

  • Download URL: guc_cms_scrapper-0.2.5.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/24.1.0

File hashes

Hashes for guc_cms_scrapper-0.2.5.tar.gz
Algorithm Hash digest
SHA256 ac524b4ae3b2bfff89175e1522b1018c8a2003a7718a8349ff7764f4e320e065
MD5 78a5f4c7677b33b259053c89c50a67ef
BLAKE2b-256 265b2c3b756b28c533cc2e3dff28da915cf316bea10e8158a34f1a1f80429cc2

See more details on using hashes here.

File details

Details for the file guc_cms_scrapper-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: guc_cms_scrapper-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/24.1.0

File hashes

Hashes for guc_cms_scrapper-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6cfc673c4bebd2ac041fb1bb81aab83d0971c786587fd7d591a14f9593893379
MD5 22ec8c911f5c86d4d1febae36c79a8fc
BLAKE2b-256 24877b64d34838169c33ee282072e782e7b1659bf0f508c22702f4c0e3ed0e62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page