12-05-2018, 09:30 PM | #1 |
Junior Member
Posts: 2
Karma: 6624
Join Date: Dec 2018
Device: kindle
|
Macrobusiness
Here's my recipe for macrobusiness.com.au
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup class AdvancedUserRecipe(BasicNewsRecipe): title = 'Macrobusiness' oldest_article = 1 max_articles_per_feed = 100 auto_cleanup = True needs_subscription = 'optional' feeds = [ ('Macrobusiness', 'https://www.macrobusiness.com.au/feed'), ] def get_browser(self): br = BasicNewsRecipe.get_browser(self) if self.username is not None and self.password is not None: br.open('https://www.macrobusiness.com.au/my-account/') br.select_form(class_=lambda x: 'login' in x) br['username'] = self.username br['password'] = self.password br.submit() return br Last edited by 2018robert; 12-05-2018 at 09:37 PM. Reason: Doesn't seem to display correctly in the forum. File attached. |
12-06-2018, 12:19 AM | #2 |
creator of calibre
Posts: 43,828
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
thanks, added.
|
Advert | |
|
Thread Tools | Search this Thread |
|