mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Macrobusinness by 2018robert
This commit is contained in:
parent
d00558765d
commit
320487b8df
28
recipes/macrobusiness.recipe
Normal file
28
recipes/macrobusiness.recipe
Normal file
@ -0,0 +1,28 @@
|
||||
#!/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
|
||||
|
||||
|
||||
class AdvancedUserRecipe(BasicNewsRecipe):
|
||||
title = 'Macrobusiness'
|
||||
language = 'en_AU'
|
||||
__author__ = '2018robert'
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user