Update psych.recipe

This commit is contained in:
unkn0w7n 2023-06-18 20:46:14 +05:30
parent 65ff07bf20
commit 190af1b846

View File

@ -43,8 +43,8 @@ class PsychologyToday(BasicNewsRecipe):
soup = self.index_to_soup(absurl(a['href']))
articles = []
for article in soup.findAll('div', attrs={'class':'article-text'}):
title = self.tag_to_string(article.find(['h2','h3'])).strip()
url = absurl(article.find(['h2','h3']).a['href'])
title = self.tag_to_string(article.find(attrs={'class':['h2','h3']})).strip()
url = absurl(article.find(attrs={'class':['h2','h3']}).a['href'])
self.log('\n', title, 'at', url)
desc = self.tag_to_string(article.find('p',**classes('description'))).strip()
author = self.tag_to_string(article.find('p',**classes('byline')).a).strip()