from app import app
from flask import render_template, request
from .looper import getNextLink

@app.route('/')
def index_page():
    return render_template('index.html')

@app.route('/loop')
def loop_request():
    link = request.args.get('link', '', type=str)
    return getNextLink(link.strip())

from app import app
from flask import render_template, request
from .looper import getNextLink

@app.route('/')
def index_page():
    return render_template('index.html')

@app.route('/loop')
def loop_request():
    if "unicode" in __builtins__:
        str_type = unicode
    else:
        str_type = str
    link = request.args.get('link', '', type=str_type)
    return getNextLink(link.strip())

Fix link being empty string in py2 if it's unicode
Fix link being empty string in py2 if it's unicode

Should fix any remaining Unicode errors.
