Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2018, 10:30 PM   #1
2018robert
Junior Member
2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals2018robert is kind to children and small, furry animals
 
Posts: 1
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
Attached Files
File Type: recipe Macrobusiness_1000.recipe (960 Bytes, 5 views)

Last edited by 2018robert; 12-05-2018 at 10:37 PM. Reason: Doesn't seem to display correctly in the forum. File attached.
2018robert is offline   Reply With Quote
Old 12-06-2018, 01:19 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,724
Karma: 10215826
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
thanks, added.
kovidgoyal is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 10:37 AM.


MobileRead.com is a privately owned, operated and funded community.