def getTop20ArticlesThroughContentAPI(): results = list() for article in getTop20Articles(): #26 is http://www.guardian.co.uk/ contentApiItem = contentapi.getArticle(article['url'][26:]) result = contentApiItem['response']['content'] result['ophan_count'] = article['count'] results.append(result) return results
def article(article_id): return render_template('article.html', article=contentapi.getArticle(article_id)['response']['content'])
def article(article_id): return render_template("article.html", article=contentapi.getArticle(article_id)["response"]["content"])