added logic to pass the firewall#1983
Open
niveditasing wants to merge 2 commits intodatacommonsorg:masterfrom
Open
added logic to pass the firewall#1983niveditasing wants to merge 2 commits intodatacommonsorg:masterfrom
niveditasing wants to merge 2 commits intodatacommonsorg:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the download_with_retry function in scripts/us_hud/income/process.py to include a custom User-Agent header and implement error handling with response.raise_for_status(). A review comment correctly identifies a security risk due to disabled SSL verification and suggests adding a timeout to the request to prevent potential hangs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HUD website's firewall (Amazon WAF) started blocking the default Python requests library. Instead of returning the file,
it returned a security challenge (HTTP status 202), causing the script to crash.
The fix bypasses the firewall so all files can download successfully. I haven't added any code to skip already-downloaded files yet—the script just successfully downloads all of them now without crashing.
Differ has no deletions as all files are now getting download
PR checklist: https://docs.google.com/spreadsheets/d/1BzweR9Sj58j0H2_BweGTmfE4Z1lrjPZL8u1FS0kzCeg/edit?pli=1&gid=0#gid=0