本文整理汇总了Python中pyopenmensa.feed.LazyBuilder.setAdditionalCharges方法的典型用法代码示例。如果您正苦于以下问题:Python LazyBuilder.setAdditionalCharges方法的具体用法?Python LazyBuilder.setAdditionalCharges怎么用?Python LazyBuilder.setAdditionalCharges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyopenmensa.feed.LazyBuilder
的用法示例。
在下文中一共展示了LazyBuilder.setAdditionalCharges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parse_url
# 需要导入模块: from pyopenmensa.feed import LazyBuilder [as 别名]
# 或者: from pyopenmensa.feed.LazyBuilder import setAdditionalCharges [as 别名]
def parse_url(url, today):
canteen = LazyBuilder()
canteen.setAdditionalCharges('student', {})
if today:
parse_week(url, canteen) # base url only contains current day
else:
parse_week(url + 'week', canteen)
parse_week(url + 'nextweek', canteen)
return canteen.toXMLFeed()
示例2: parse_url
# 需要导入模块: from pyopenmensa.feed import LazyBuilder [as 别名]
# 或者: from pyopenmensa.feed.LazyBuilder import setAdditionalCharges [as 别名]
def parse_url(url, today=False):
canteen = LazyBuilder()
canteen.setAdditionalCharges("student", {})
parse_week(url, canteen)
return canteen.toXMLFeed()