Skip to content

Commit 83944c8

Browse files
author
Mike Gauthier
committed
Added a hash to the end of the feed_file
This allows for more than one feed per domain name (netloc).
1 parent 8c27331 commit 83944c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zulip/integrations/rss/rss-bot

+2-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ client: zulip.Client = zulip.Client(
209209
first_message = True
210210

211211
for feed_url in feed_urls:
212-
feed_file = os.path.join(opts.data_dir, urllib.parse.urlparse(feed_url).netloc) # Type: str
212+
feed_url_hash = '-'+hashlib.shake_128(feed_url.encode()).hexdigest(4)
213+
feed_file = os.path.join(opts.data_dir, urllib.parse.urlparse(feed_url).netloc+feed_url_hash) # Type: str
213214

214215
try:
215216
with open(feed_file) as f:

0 commit comments

Comments
 (0)