예제 #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)