示例#1
0
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
示例#2
0
def article(article_id):
    return render_template('article.html', article=contentapi.getArticle(article_id)['response']['content']) 
示例#3
0
def article(article_id):
    return render_template("article.html", article=contentapi.getArticle(article_id)["response"]["content"])