|
|
#1 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 85520
Join Date: May 2021
Device: kindle
|
harvard business review magazine recipe
https://hbr.org/magazine
loads all articles.. copied stuff from wired recipe to not send/use cookies. |
|
|
|
|
|
#2 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 85520
Join Date: May 2021
Device: kindle
|
changes to find description
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 85520
Join Date: May 2021
Device: kindle
|
sections and toc
|
|
|
|
|
|
#4 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 85520
Join Date: May 2021
Device: kindle
|
https://github.com/kovidgoyal/calibr...pes/hbr.recipe
article sidebar font size is too small (0.75em) to read when text is longer.. and other changes. Code:
extra_css = '''
article-sidebar{font-family:Georgia,"Times New Roman",Times,serif; border:ridge; text-align:left;}
[close-caption]{ border:ridge; font-size:small; text-align:center;}
article-ideainbrief{font-family:Georgia,"Times New Roman",Times,serif; text-align:left; font-style:italic; }
'''
|
|
|
|
|
|
#5 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 645
Karma: 85520
Join Date: May 2021
Device: kindle
|
changes
css
Code:
extra_css = '''
article-sidebar{font-family:Georgia,"Times New Roman",Times,serif; border:ridge; text-align:left;}
[close-caption]{ border:ridge; font-size:small; text-align:center;}
article-ideainbrief{font-family:Georgia,"Times New Roman",Times,serif; text-align:left; font-style:italic; }
.article-byline-list{font-size:small;}
.credits--hero-image{font-size:small;}
.credits--inline-image{font-size:small;}
.caption--inline-image{font-size:small;}
.description-text{font-size:small; color:gray;}
.right-rail--container{font-size:small; color:#4c4c4c;}
.link--black{font-size:small;}
.article-callout{color:#4c4c4c; text-align:center;}
.slug-content{color:gray;}
'''
Code:
keep_only_tags = [
classes(
'headline-container hero-image-content article-summary article-body standard-content'
'article-dek-group article-dek slug-container'
),
dict(name='article-sidebar'),
]
Code:
def preprocess_html(self, soup):
for slug in soup.findAll(**classes('slug-content')):
del slug['href']
for dek in soup.findAll(**classes('article-byline')):
for by in dek.findAll('span', attrs={'class':'by-prefix'}):
by.extract()
for li in dek.findAll('li'):
li.name = 'span'
for h2 in soup.findAll(('h2','h3')):
h2.name = 'h5'
return soup
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Harvard Business Review recipe returns: 'ascii' codec can't encode character | ktan91 | Recipes | 3 | 10-22-2017 01:53 PM |
| Harvard Business Review recipe not working | tillkundt | Recipes | 1 | 04-03-2015 12:59 AM |
| Harvard Business Review Update | rainrdx | Recipes | 1 | 04-04-2013 03:04 PM |
| Harvard Business Review DISABLED? | besianm | Recipes | 3 | 09-12-2012 05:28 PM |
| harvard business review (hbr) disabled? | oddboy | Recipes | 3 | 09-10-2012 04:24 PM |