def download(self, spreadsheet, gid, format="csv"):
        url_format = "https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=%s&exportFormat=%s&gid=%i"
        headers = {
            b"Authorization": b"GoogleLogin auth=" + self.get_auth_token(),
            b"GData-Version": b"3.0"
        }
        req = urllib.request.Request(url_format % (spreadsheet, format, gid), headers=headers)
        return io.TextIOWrapper(urllib.request.urlopen(req), encoding="utf8")
dataset/ETHPy150Open codefordc/ancfinder/scripts/update_anc_database.py/GoogleDocsClient.download/original