예제 #1
0
def combined_reviews():
    pitchfork_reviews = PitchforkReviews.get_all_reviews()
    metacritic_reviews = MetacriticReviews.get_all_reviews()
    return render_template('combined reviews.html',
                           title='Combined reviews',
                           pitchfork=pitchfork_reviews,
                           metacritic=metacritic_reviews)
예제 #2
0
def combined_reviews():
    pitchfork_reviews = PitchforkReviews.get_all_reviews()
    metacritic_reviews = MetacriticReviews.get_all_reviews()
    return render_template('combined reviews.html',
                           title='Combined reviews',
                           pitchfork=pitchfork_reviews,
                           metacritic=metacritic_reviews)
예제 #3
0
 def process_item(self, item, spider):
     review = MetacriticReviews(**item)
     if self.album_in_database(item['artist'], item['album'],
                               item['review_date']):
         self.update_database_record(review)
     else:
         self.add_item_to_database(review)
     return item
예제 #4
0
def metacritic():
    reviews = MetacriticReviews.get_all_reviews()
    return render_template('metacritic.html',
                           title='All Metacritic Reviews',
                           reviews=reviews)
예제 #5
0
def acclaimed_metacritic():
    reviews = MetacriticReviews.get_universally_acclaimed_reviews()
    return render_template('acclaimed metacritic.html',
                           title='Best of Metacritic',
                           reviews=reviews)
예제 #6
0
def metacritic():
    reviews = MetacriticReviews.get_all_reviews()
    return render_template('metacritic.html',
                           title='All Metacritic Reviews',
                           reviews=reviews)
예제 #7
0
def acclaimed_metacritic():
    reviews = MetacriticReviews.get_universally_acclaimed_reviews()
    return render_template('acclaimed metacritic.html',
                           title='Best of Metacritic',
                           reviews=reviews)