#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib.request import os # Define paths base_dir = r"D:\TC_UP\2023card\projects\openclaw\教育AI研究\高等教育AI专题\文献库" os.makedirs(base_dir, exist_ok=True) # Download first paper url1 = "https://cs.harvard.edu/malan/publications/V1fp0567-liu.pdf" file1 = os.path.join(base_dir, "Teaching_CS50_with_AI_SIGCSE2024.pdf") try: urllib.request.urlretrieve(url1, file1) print(f"Successfully downloaded: Teaching_CS50_with_AI_SIGCSE2024.pdf") except Exception as e: print(f"Error downloading first paper: {e}") # Download second paper url2 = "https://cs.harvard.edu/malan/publications/fp0627-liu.pdf" file2 = os.path.join(base_dir, "Improving_AI_in_CS50_SIGCSE2025.pdf") try: urllib.request.urlretrieve(url2, file2) print(f"Successfully downloaded: Improving_AI_in_CS50_SIGCSE2025.pdf") except Exception as e: print(f"Error downloading second paper: {e}")