Cleaned up ZillowGrabber code, removed Test and Credentials

This commit is contained in:
tsb1995 2020-06-07 10:40:41 -07:00
parent 48b00bf284
commit d3dd81ab00
2 changed files with 49 additions and 52 deletions

View File

@ -76,7 +76,6 @@ range_ = "Sheet1!A:A"
d = datetime.datetime.today()
sheet_name = 'Housing ' + d.strftime('%d-%m-%Y')
def main():
creds = None
# The file token.pickle stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
@ -84,6 +83,7 @@ def main():
if os.path.exists('token.pickle'):
with open('token.pickle', 'rb') as token:
creds = pickle.load(token)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
@ -135,5 +135,3 @@ def main():
request = service.spreadsheets().values().append(spreadsheetId=spreadsheet_id, range=range_, body=resource,
valueInputOption="USER_ENTERED")
response = request.execute()
main()

View File

@ -1 +0,0 @@
{"installed":{"client_id":"495919805073-o2o41tu9c9pv9mpo4ugjdcca6h5jg5u7.apps.googleusercontent.com","project_id":"zillowfun-1581659411719","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"HL2xQvsWITylqar1GsC8noW1","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}