Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/unkn0w7n/calibre
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 2, 2025
2 parents b839383 + 57f98b6 commit 68ca534
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions recipes/arcamax.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,38 @@ class Arcamax(BasicNewsRecipe):
# CHOOSE COMIC STRIPS BELOW - REMOVE COMMENT '# ' FROM IN FRONT OF DESIRED
# STRIPS

recipe_specific_options = {
'days': {
'short': 'NUMBER OF COMICS TO RETRIEVE',
'default': str(num_comics_to_get)
}
}

def __init__(self, *args, **kwargs):
BasicNewsRecipe.__init__(self, *args, **kwargs)
d = self.recipe_specific_options.get('days')
if d and isinstance(d, str):
self.num_comics_to_get = float(d)

conversion_options = {'linearize_tables': True, 'comment': description, 'tags': category, 'language': language
}

keep_only_tags = [
dict(name='header', attrs={'class': 'fn-content-header bluelabel'}),
dict(name='header', attrs={'class': 'fn-content-header bluelabel', 'style': False}),
dict(name='figure', attrs={'class': ['comic']}),
]

remove_tags_after = [
dict(name='figure', attrs={'class': ['comic']}),
]

def parse_index(self):
feeds = []
self.panel_tdir = PersistentTemporaryDirectory('arcamax')
self.panel_counter = 0

# https://www.arcamax.com/comics

for title, url in [
# ####### COMICS - GENERAL ########
# (u"9 Chickweed Lane", u"https://www.arcamax.com/thefunnies/ninechickweedlane"),
Expand All @@ -53,7 +73,6 @@ class Arcamax(BasicNewsRecipe):
# u"Boondocks", u"https://www.arcamax.com/thefunnies/boondocks"),
# (u"Cathy", u"https://www.arcamax.com/thefunnies/cathy"),
# (u"Daddys Home", u"https://www.arcamax.com/thefunnies/daddyshome"),
(u"Dilbert", u"https://www.arcamax.com/thefunnies/dilbert"),
# (u"Dinette Set", u"https://www.arcamax.com/thefunnies/thedinetteset"),
(u"Dog Eat Doug", u"https://www.arcamax.com/thefunnies/dogeatdoug"),
# (u"Doonesbury", u"https://www.arcamax.com/thefunnies/doonesbury"),
Expand Down Expand Up @@ -123,5 +142,5 @@ class Arcamax(BasicNewsRecipe):
return soup

extra_css = '''
img {max-width:100%; min-width:100%;}
img { display:block; margin:0 auto; }
'''

0 comments on commit 68ca534

Please sign in to comment.