From 8310befc761054f67fb7f0f62e989a986234bf24 Mon Sep 17 00:00:00 2001 From: hackish Date: Mon, 14 Aug 2023 15:56:40 -0700 Subject: [PATCH] nvm, medium has a built-in tag filter --- snowscraper/scrapers/medium.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/snowscraper/scrapers/medium.py b/snowscraper/scrapers/medium.py index b10f954..3620789 100644 --- a/snowscraper/scrapers/medium.py +++ b/snowscraper/scrapers/medium.py @@ -10,7 +10,7 @@ from ..scraper import BaseScraper @register_scraper class MediumScraper(BaseScraper): - url = "https://medium.com/feed/snowflake" + url = "https://medium.com/feed/snowflake/tagged/snowflake" def __init__(self, after, *args, **kwargs): super(MediumScraper, self).__init__(*args, **kwargs) @@ -20,8 +20,6 @@ class MediumScraper(BaseScraper): def scrape(self): print("Scraping Medium") for entry in feedparser.parse(MediumScraper.url)["entries"]: - if not any(tag["term"] == "snowflake" for tag in entry["tags"]): - continue updated = string_to_datetime(entry["updated"]) if updated > self.after: self.data[entry["link"]] = {