Skip to content

Commit

Permalink
fixed format and lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulchhajer committed Jan 22, 2025
1 parent 23a6c50 commit 4b0b53a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions apps/indianews/india_news.star
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ def main(config):
#get top 3 newest headlines, excluding market/industry news
title = []
excluded_patterns = [
"economictimes.indiatimes.com/markets/",
"livemint.com/industry/",
"www.livemint.com/companies/",
"economictimes.indiatimes.com/wealth/",
"economictimes.indiatimes.com/industry/",
"timesofindia.indiatimes.com/city/ahmedabad/",
"timesofindia.indiatimes.com/city/bengaluru/",
"timesofindia.indiatimes.com/sports/",
"economictimes.indiatimes.com/news/sports/",
"timesofindia.indiatimes.com/tv/",
"timesofindia.indiatimes.com/education/",
"timesofindia.indiatimes.com/entertainment/english/hollywood/"
"economictimes.indiatimes.com/markets/",
"livemint.com/industry/",
"www.livemint.com/companies/",
"economictimes.indiatimes.com/wealth/",
"economictimes.indiatimes.com/industry/",
"timesofindia.indiatimes.com/city/ahmedabad/",
"timesofindia.indiatimes.com/city/bengaluru/",
"timesofindia.indiatimes.com/sports/",
"economictimes.indiatimes.com/news/sports/",
"timesofindia.indiatimes.com/tv/",
"timesofindia.indiatimes.com/education/",
"timesofindia.indiatimes.com/entertainment/english/hollywood/",
]
max_articles = len(rep.json()["articles"])
for j in range(max_articles):
Expand All @@ -82,14 +82,14 @@ def main(config):
article = rep.json()["articles"][(j + shift) % max_articles]
article_url = article["url"]
article_title = article["title"].split(" - ")[0]

# Check if URL contains any excluded patterns
should_exclude = False
for pattern in excluded_patterns:
if pattern in article_url:
should_exclude = True
break

if not should_exclude:
title.append(article_title)

Expand Down

0 comments on commit 4b0b53a

Please sign in to comment.