mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
IGN:...
This commit is contained in:
parent
d447bda625
commit
3c05e850d5
@ -1,10 +1,12 @@
|
||||
import re
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Physicstoday(BasicNewsRecipe):
|
||||
title = u'Physicstoday'
|
||||
__author__ = 'Hypernova'
|
||||
description = u'Physicstoday'
|
||||
__author__ = 'Hypernova'
|
||||
description = u'Physics Today magazine'
|
||||
publisher = 'American Institute of Physics'
|
||||
category = 'Physics'
|
||||
language = _('English')
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 100
|
||||
@ -13,9 +15,12 @@ class Physicstoday(BasicNewsRecipe):
|
||||
needs_subscription = True
|
||||
remove_javascript = True
|
||||
remove_tags_before = dict(name='h1')
|
||||
remove_tags_after = [dict(name='div', attrs={'id':'footer'})]
|
||||
|
||||
feeds = [(u'All', u'http://www.physicstoday.org/feed.xml')]
|
||||
remove_tags = [dict(name='div', attrs={'class':'highslide-footer'})]
|
||||
remove_tags = [dict(name='div', attrs={'class':'highslide-header'})]
|
||||
preprocess_regexps = [
|
||||
(re.compile(r'<!--start PHTOAD_tail.jsp -->.*</body>', re.DOTALL|re.IGNORECASE),
|
||||
lambda match: '</body>'),
|
||||
]
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
@ -26,3 +31,5 @@ class Physicstoday(BasicNewsRecipe):
|
||||
br['password'] = self.password
|
||||
br.submit()
|
||||
return br
|
||||
|
||||
feeds = [(u'All', u'http://www.physicstoday.org/feed.xml')]
|
Loading…
x
Reference in New Issue
Block a user