Update Newspaper Front Cover
Hi, created a simple recipe that would include the newspaper front page each day. However that newspaper front cover is no longer updated daily on the current site. So I found a new site to pull the newspaper cover which is updated daily- but the recipe is not working. Not sure what I'm doing wrong (?)
Previous recipe (worked well):
def get_cover_url(self):
soup = self.index_to_soup('https://www.frontpages.com/star-tribune/')
return 'https://www.frontpages.com' + soup.find('img', attrs={'id':'giornale-img'})['src']
New recipe (not working):
def get_cover_url(self):
soup = self.index_to_soup('https://frontpages.freedomforum.org/newspapers/mn_st-Star_Tribune')
return 'https://frontpages.freedomforum.org' + soup.find('img', attrs={'id':'giornale-img'})['src']
Please let me know how to fix. The new recipe only pulls a generic cover. Thanks.
|