<commit_before>from flask import Flask, session, render_template, request, redirect, url_for, abort, jsonify
import feedparser
import requests
readability_key = "c439f2ebaf65caf56aad16d906d5da4a5ce21023"
readability_root_url = "http://readability.com/api/content/v1/parser"
#article_url = "http://www.aljazeera.com/news/middleeast/2014/07/gaza-lies-ruins-israel-war-201472794647457501.html"
#article_url = "http://feedproxy.google.com/~r/jpost/LBao/~3/fapMYng9Vzw/story01.htm"

app = Flask(__name__)

@app.route('/')
def home():
	
	jpost = feedparser.parse("http://www.jpost.com/Rss/RssFeedsHeadlines.aspx")
	jpost_stories = jpost.entries
	
	aljazeera = feedparser.parse('http://www.aljazeera.com/Services/Rss/?PostingId=2007731105943979989')
	aljazeera_stories = aljazeera.entries

	return render_template('home.html',jpost_stories=jpost_stories, aljazeera_stories=aljazeera_stories)

@app.route('/article')
def get_article():
	url = request.args.get("url")
	print url
	r = requests.get("%s?url=%s&token=%s" % (readability_root_url,url,readability_key))
	print r
	data = r.json()
	return data["content"]

if __name__ == '__main__':
    try:
        app.run(host='0.0.0.0', port=5000, debug=True)
    except Exception as e:
        app.logger.debug("%s"%e)

<commit_msg>now binding to correct port<commit_after>from flask import Flask, session, render_template, request, redirect, url_for, abort, jsonify
import feedparser
import requests
readability_key = "c439f2ebaf65caf56aad16d906d5da4a5ce21023"
readability_root_url = "http://readability.com/api/content/v1/parser"
#article_url = "http://www.aljazeera.com/news/middleeast/2014/07/gaza-lies-ruins-israel-war-201472794647457501.html"
#article_url = "http://feedproxy.google.com/~r/jpost/LBao/~3/fapMYng9Vzw/story01.htm"

app = Flask(__name__)

@app.route('/')
def home():
	
	jpost = feedparser.parse("http://www.jpost.com/Rss/RssFeedsHeadlines.aspx")
	jpost_stories = jpost.entries
	
	aljazeera = feedparser.parse('http://www.aljazeera.com/Services/Rss/?PostingId=2007731105943979989')
	aljazeera_stories = aljazeera.entries

	return render_template('home.html',jpost_stories=jpost_stories, aljazeera_stories=aljazeera_stories)

@app.route('/article')
def get_article():
	url = request.args.get("url")
	print url
	r = requests.get("%s?url=%s&token=%s" % (readability_root_url,url,readability_key))
	print r
	data = r.json()
	return data["content"]


if __name__ == '__main__':
    try:
        port = int(os.environ.get('PORT', 5000))
        app.run(host='0.0.0.0', port=port, debug=True)
    except Exception as e:
        app.logger.debug("%s"%e)


{'fraction_non_alphanumeric': 0.1490015360983103, 'fraction_numerical': 0.05913978494623656, 'mean_word_length': 5.448019801980198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3640480', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1004, 'n_words': 141}