View Single Post
Old 06-01-2022, 10:57 AM   #5
unkn0wn
Guru
unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.unkn0wn understands the Henderson-Hasselbalch Equation.
 
Posts: 625
Karma: 85520
Join Date: May 2021
Device: kindle
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;}'
unkn0wn is offline   Reply With Quote