Skip to content

Commit

Permalink
fix telegram: crawl_max_depth can be None if it is not enabled for a …
Browse files Browse the repository at this point in the history
…user
  • Loading branch information
dale-wahl committed Jul 22, 2024
1 parent 3dfe7af commit 1c0bf5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasources/telegram/search_telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ async def gather_posts(self, client, queries, max_items, min_date, max_date):
break

# if crawling is enabled, see if we found something to add to the query
if crawl_max_depth > 0 and (not crawl_msg_threshold or depth_map.get(query) < crawl_msg_threshold):
if crawl_max_depth and (not crawl_msg_threshold or depth_map.get(query) < crawl_msg_threshold):
message_fwd = serialized_message.get("fwd_from")
fwd_from = None
if message_fwd and message_fwd["from_id"] and message_fwd["from_id"].get("_type") == "PeerChannel":
Expand Down

0 comments on commit 1c0bf5e

Please sign in to comment.