本文整理汇总了Python中account.Account.request_GET方法的典型用法代码示例。如果您正苦于以下问题:Python Account.request_GET方法的具体用法?Python Account.request_GET怎么用?Python Account.request_GET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account.Account
的用法示例。
在下文中一共展示了Account.request_GET方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: datetime
# 需要导入模块: from account import Account [as 别名]
# 或者: from account.Account import request_GET [as 别名]
"""Requires a page of dorf1.php"""
movements = doc.find("table#movements tr")
movs = []
s = True
for mov in movements:
if s:
s = False
continue
time = datetime.strptime(mov.find("div.dur_r span").text(), "%H:%M:%S") - datetime(1900, 1, 1)
type1 = mov.find("td.typ img").attr("class")
movs.append({'type':type1, 'timer': time})
return movs
if __name__ == "__main__":
from account import Account
import log
import hero
log.logger.log_name = 'Gl4ss'
acc = Account((3,'de'),'Gl4ss')
acc.loadup()
#doc = acc.request_GET('/dorf1.php')
#print(read_production_boost(doc))
doc = acc.request_GET('/hero_inventory.php')
h = hero.Hero()
read_hero(doc, h)
print(h)
print(h.get_production_bonus())
示例2: next
# 需要导入模块: from account import Account [as 别名]
# 或者: from account.Account import request_GET [as 别名]
logger.log_info("wait for email", "wait for activation email to receive...")
user_db = account.get_db()
while 'activation_code' not in user_db:
time.sleep(1)
user_db = account.get_db()
account.perform_activation("so")
account.loadup()
first_village = next(iter(account.villages.values()))
running = True
doc = account.request_GET("/dorf1.php")
#movements = reader.read_troop_movement_simple(doc)
#print(movements)
#sys.exit()
jm = JobManager(first_village)
first_village.event_handlers.append(jm)
if not jobs_from_db:
jm.init_from_def(build_roman)
first_village.fire_event( Event(first_village, 'job_completed', datetime.now(), job=jm.root) )
else:
jm.init_from_db()
first_village.refresh()
first_village.fire_event( Event(first_village, 'job_completed', datetime.now(), job=jm.root) )