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)
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
def metacritic(): reviews = MetacriticReviews.get_all_reviews() return render_template('metacritic.html', title='All Metacritic Reviews', reviews=reviews)
def acclaimed_metacritic(): reviews = MetacriticReviews.get_universally_acclaimed_reviews() return render_template('acclaimed metacritic.html', title='Best of Metacritic', reviews=reviews)