我可以向Google日历批量添加多个事件,但这只是我的默认日历。我如何才能让相同的代码与另一个我有网址的日历一起工作?在
request_feed = gdata.calendar.CalendarEventFeed()
# add events to the request_feed
request_feed.AddInsert(entry=InsertSingleEvent(calendar_service, "walk the dog at 4:00pm"))
request_feed.AddInsert(entry=InsertSingleEvent(calendar_service, "walk the cat at 5:00pm"))
response_feed = calendar_service.ExecuteBatch(request_feed,
gdata.calendar.service.DEFAULT_BATCH_URL))
这将很好地工作,所有的事件将出现在我的日历后。但当我替换:
^{2}$有:
url = 'calendar/feeds/.../private/full'
response_feed = calendar_service.ExecuteBatch(request_feed,
url))
我有错误:
gaierror: [Errno 11004] getaddrinfo failed
也请注意,我已经能够使用该网址添加事件本身。在
看看code,似乎:
在您的代码中,它看起来像是在尝试解析部分URL。如果将URL格式化为:
^{pr2}$它应该有用。在
相关问题 更多 >
编程相关推荐