Skip to content

Commit

Permalink
main script and setup.py edited for pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
fam007e committed Sep 25, 2024
1 parent 3a90a3a commit 5cdcb26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions OandALvLQPSDL.py → o_and_a_lv_qp_sdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_subjects(exam_board, exam_level):
url = f'{BASE_URL}index.php?dirpath=./CAIE/{exam_level}/&order=0'
else: # Edexcel
url = f'{BASE_URL}index.php?dirpath=./Edexcel/{exam_level}/&order=0'

response = requests.get(url, timeout=10)
soup = BeautifulSoup(response.text, 'html.parser')
subject_links = soup.find_all('a', class_='directory')
Expand Down Expand Up @@ -161,7 +161,11 @@ def main():
print(f"\nProcessing {subject}...")

pdfs = get_pdfs(subject_url, exam_board)
subject_dir = os.path.join(exam_board, exam_level.replace('+', ' '), subject.replace('/', '_').replace('&', 'and'))
subject_dir = os.path.join(
exam_board,
exam_level.replace('+', ' '),
subject.replace('/', '_').replace('&', 'and')
)
os.makedirs(subject_dir, exist_ok=True)

for filename, pdf_url in pdfs.items():
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Script to install exam paper downloader."""
from setuptools import setup, find_packages

# Read the contents of your README file
Expand All @@ -10,7 +11,7 @@
description='A script to download A-Level test papers and mark schemes from xtremepape.rs.',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/fam007e/fun007/',
url='https://github.com/fam007e/OandALvl-exam-paper-downloader',
author='Faisal Ahmed Moshiur',
author_email='[email protected]',
license='MIT',
Expand Down

0 comments on commit 5cdcb26

Please sign in to comment.