https://github.com/kovidgoyal/calibr...s_today.recipe
business today default magazine page is for next edition.. and they keep adding articles.. I changed it to choose present edition and not the future edition thats still under construction.
from line 28
Code:
def parse_index(self):
soup = self.index_to_soup('https://www.businesstoday.in/magazine')
issue = soup.find(attrs={'class': 'view-id-latest_issue_magzine'})
a = issue.findAll('a', href=lambda x: x and x.startswith('/magazine/issue/'))[1]
url = a['href']
self.log('issue =', url)
soup = self.index_to_soup('https://www.businesstoday.in' + url)
tag = soup.find(attrs={'class': 'issue-image'})
if tag:
self.cover_url = tag.find('img')['src']
section = None
sections = {}
and
Quote:
extra_css = 'a[href^="https://www.businesstoday.in/videos"]{display: none;}'
|