Carson1

Untitled

Jul 4th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. import time
  2. import gspread
  3. import datetime
  4. from oauth2client.service_account import ServiceAccountCredentials
  5.  
  6. scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
  7.  
  8. credentials = ServiceAccountCredentials.from_json_keyfile_name('/home/alexandr/Downloads/Tesst-2e1cefd1b150.json',
  9.                                                                scope)
  10. gc = gspread.authorize(credentials)
  11. k = str((datetime.datetime.now() + datetime.timedelta(days=1)).strftime("%d %B, %Y"))
  12. print(k)
  13. while True:
  14.     wks = gc.open('Sane').sheet1
  15.  
  16.     print(wks.get_all_records())
  17.  
  18.     time.sleep(10800)
Advertisement
Add Comment
Please, Sign In to add comment