Skip to content

Instantly share code, notes, and snippets.

View nhtranngoc's full-sized avatar

Nam Tran Ngoc nhtranngoc

View GitHub Profile
@nhtranngoc
nhtranngoc / cambridge_audio_scraper.py
Created May 8, 2024 17:00
Automated Scraper for Cambridge Listening Tests for various books (Preliminary 1, Preliminary 1 For School, New KET 1, New KET 1 For School, FIRST 4, FIRST 5, and C1 Advanced 4)
import requests
# Universal header, pretend we're a browser yay
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'}
book_prefixes = ["Pre1", "Prefs1", "Key1", "Kfs1", "ELT_First4", "ELT_FIRST5", "ELT_Adv4"]
test_count = 4
# PET has 4 sections
# KET has 5 sections
# FCE has 4 sections