Skip to content

Commit c354720

Browse files
committed
Add crawl_from_base_domain_by_rss_crawler option in configuration to allow the RssCrawler to search for an RSS feed in the provided url
1 parent 06d25bb commit c354720

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

newsplease/config/config.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ check_crawler_has_urls_to_scan = False
4545
# Default: True
4646
check_certificate = True
4747

48-
# Defines if the RssCrawler should start crawling from the base domain or the provided url
48+
# Defines if the RssCrawler should start crawling from the base url or the provided url
4949
# Default: True
50-
crawl_from_base_domain_by_rss_crawler = True
50+
crawl_from_base_url_by_rss_crawler = True
5151

5252
# Determines how many hours need to pass since the last download of a webpage
5353
# to be downloaded again by the RssCrawler

newsplease/config/config_lib.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ check_crawler_has_urls_to_scan = False
5151
# Default: True
5252
check_certificate = True
5353

54-
# Defines if the RssCrawler should start crawling from the base domain or the provided url
54+
# Defines if the RssCrawler should start crawling from the base url or the provided url
5555
# Default: True
56-
crawl_from_base_domain_by_rss_crawler = True
56+
crawl_from_base_url_by_rss_crawler = True
5757

5858
# Determines how many hours need to pass since the last download of a webpage
5959
# to be downloaded again by the RssCrawler

newsplease/crawler/spiders/rss_crawler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ def __init__(self, helper, url, config, ignore_regex, *args, **kwargs):
4848
else True
4949
)
5050

51-
crawl_from_base_domain_by_rss_crawler = (
52-
bool(config.section("Crawler").get('crawl_from_base_domain_by_rss_crawler'))
53-
if config.section("Crawler").get('crawl_from_base_domain_by_rss_crawler') is not None
51+
crawl_from_base_url_by_rss_crawler = (
52+
bool(config.section("Crawler").get('crawl_from_base_url_by_rss_crawler'))
53+
if config.section("Crawler").get('crawl_from_base_url_by_rss_crawler') is not None
5454
else True
5555
)
5656

5757
self.start_urls = [
5858
self.helper.url_extractor.get_start_url(url)
59-
if crawl_from_base_domain_by_rss_crawler
59+
if crawl_from_base_url_by_rss_crawler
6060
else url
6161
]
6262

0 commit comments

Comments
 (0)