我想知道我需要做些什么才能成功发送从Google表格中获取该数据并将其发布到网站的发布请求(让我们说“ www.fc.com” enter image description here)。我一直在搜索网络,但确实看到了一些令人困惑的示例。如果有人可以帮助我,将不胜感激!谢谢!这是我的代码:
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import pprint
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
creds = ServiceAccountCredentials.from_json_keyfile_name("client_secret.json", scope)
client = gspread.authorize(creds)
sheet = client.open("python google spreadsheets").sheet1
# Add a new Row!
row = ["I", "am", "Kenny", "Whats", "your", "name", "?"]
index=147
sheet.insert_row(row, index)
print(sheet.row_count)