コード例 #1
0
ファイル: nonsense_server.py プロジェクト: man1/nonsense
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
ファイル: nonsense_server.py プロジェクト: man1/nonsense
def shortPoem():
  return template.replace("*****", getPoem("http://eliotswasteland.tripod.com/twl.html", 1, 7, True))
コード例 #3
0
ファイル: nonsense_server.py プロジェクト: man1/nonsense
def defaultPoem():
  return getPoem("http://eliotswasteland.tripod.com/twl.html", 5, 7, True)
コード例 #4
0
ファイル: nonsense_server.py プロジェクト: man1/nonsense
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)