nvm, medium has a built-in tag filter
This commit is contained in:
parent
652b4b6acf
commit
8310befc76
1 changed files with 1 additions and 3 deletions
|
@ -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"]] = {
|
||||
|
|
Loading…
Reference in a new issue