示例#1
0
def getJSON():
  url = request.args.get('url', 'http://eliotswasteland.tripod.com/twl.html')
  lines = request.args.get('lines', '5')
  words = request.args.get('words', '7')
  return jsonify({'poem': getPoem(url, int(lines), int(words), True)})
示例#2
0
def shortPoem():
  return template.replace("*****", getPoem("http://eliotswasteland.tripod.com/twl.html", 1, 7, True))
示例#3
0
def defaultPoem():
  return getPoem("http://eliotswasteland.tripod.com/twl.html", 5, 7, True)
示例#4
0
def withParams():
  url = request.args.get('url', 'http://eliotswasteland.tripod.com/twl.html')
  lines = request.args.get('lines', '5')
  words = request.args.get('words', '7')
  return getPoem(url, int(lines), int(words), True)