From 47bdef2ff0fd69ff8e6d741906d9cd25963fcbc9 Mon Sep 17 00:00:00 2001 From: James Addison Date: Tue, 6 Sep 2022 21:30:36 +0100 Subject: [PATCH 1/2] Add updated domain name for MobKitchen scraper Resolves #597 --- recipe_scrapers/__init__.py | 3 ++- recipe_scrapers/mobkitchen.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/recipe_scrapers/__init__.py b/recipe_scrapers/__init__.py index ed8064806..8f03274bd 100644 --- a/recipe_scrapers/__init__.py +++ b/recipe_scrapers/__init__.py @@ -347,7 +347,8 @@ Mindmegette.host(): Mindmegette, Minimalistbaker.host(): Minimalistbaker, Misya.host(): Misya, - MobKitchen.host(): MobKitchen, + MobKitchen.host(domain="mob.co.uk"): MobKitchen, + MobKitchen.host(domain="mobkitchen.co.uk"): MobKitchen, MomsWithCrockPots.host(): MomsWithCrockPots, MonsieurCuisine.host(): MonsieurCuisine, MotherThyme.host(): MotherThyme, diff --git a/recipe_scrapers/mobkitchen.py b/recipe_scrapers/mobkitchen.py index cecf1835e..e1b4f1d06 100644 --- a/recipe_scrapers/mobkitchen.py +++ b/recipe_scrapers/mobkitchen.py @@ -26,8 +26,8 @@ def __init__(self, *args, **kwargs): self.schema = SchemaOrg(recipe_schema, raw=True) @classmethod - def host(cls): - return "mobkitchen.co.uk" + def host(self, domain="mobkitchen.co.uk"): + return domain def author(self): return self.schema.author() From f786ccecf89cfbe56de5a6165f9887f1956e973e Mon Sep 17 00:00:00 2001 From: James Addison Date: Tue, 6 Sep 2022 21:32:51 +0100 Subject: [PATCH 2/2] Fixup / nitpick: use more-Pythonic argument name 'cls' for first argument to classmethod 'host' --- recipe_scrapers/mobkitchen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe_scrapers/mobkitchen.py b/recipe_scrapers/mobkitchen.py index e1b4f1d06..05dce4782 100644 --- a/recipe_scrapers/mobkitchen.py +++ b/recipe_scrapers/mobkitchen.py @@ -26,7 +26,7 @@ def __init__(self, *args, **kwargs): self.schema = SchemaOrg(recipe_schema, raw=True) @classmethod - def host(self, domain="mobkitchen.co.uk"): + def host(cls, domain="mobkitchen.co.uk"): return domain def author(self):