![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 82692
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 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 82692
Join Date: May 2021
Device: kindle
|
changes to find description
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 82692
Join Date: May 2021
Device: kindle
|
sections and toc
|
![]() |
![]() |
![]() |
#4 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 82692
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 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 468
Karma: 82692
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 | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Harvard Business Review recipe returns: 'ascii' codec can't encode character | ktan91 | Recipes | 3 | 10-22-2017 12:53 PM |
Harvard Business Review recipe not working | tillkundt | Recipes | 1 | 04-02-2015 11:59 PM |
Harvard Business Review Update | rainrdx | Recipes | 1 | 04-04-2013 02:04 PM |
Harvard Business Review DISABLED? | besianm | Recipes | 3 | 09-12-2012 04:28 PM |
harvard business review (hbr) disabled? | oddboy | Recipes | 3 | 09-10-2012 03:24 PM |