Task: Implement Robust URL Retrieval with Error Detection in Python
Task: Implement Robust URL Retrieval with Error Detection in Python: a task in Terminal-Lego-15k (Harbor dataset). Create a Python script that wraps urllib.urlretrieve (Python 2) or urllib.request.urlretrieve (Python 3) to properly detect and handle failed downloads (e.g., 404 errors, non-existent…
The task
Create a Python script that wraps `urllib.urlretrieve` (Python 2) or `urllib.request.urlretrieve` (Python 3) to properly detect and handle failed downloads (e.g., 404 errors, non-existent files) instead of silently saving error HTML pages as if they were valid files.
Part of PrimeIntellect/Terminal-Lego-15k.