deconstructing db url

I tried grabbing the db download url with python's urlparse and opening the file locally with urlretrieve, but I was getting a big useless blob of data b/c db embeds the file into a page from which you can download the file. But you can apparently hack the download link but changing the value in the query part of the of the URL. An example link looks like:, and if you change the zero to a one the it becomes a direct download link that i can open and read in python. I wrote a function that parses the url and rebuilds a new url with the changed value. I'll be testing the new url to open and retrieve a file locally. Also, I'll look into seeing if a similar method would work for a google drive link. I did a check-in the main author who helped me think through the issue. I really appreciate the immediate feedback of a mentorship relationship when facing an unforeseen problem. The assurance that my approach wasn't wrong, that I wasn't crazy, and the ability to think through a way out of the problem with someone is critical for building skills and confidence.