Skip video article for now
This commit is contained in:
parent
3b217a6501
commit
a41a86e298
1 changed files with 7 additions and 1 deletions
|
|
@ -80,7 +80,13 @@ def generate_feed(town_url, feed_url, feed_path):
|
|||
print(f"Found {len(small_articles)} articles...")
|
||||
for small_article in small_articles:
|
||||
t = small_article.find_all("span")[1].text
|
||||
link = "https://" + main_domain + small_article.find("a").get("href")
|
||||
if small_article.find("a").get("href").startswith("https"):
|
||||
link = small_article.find("a").get("href")
|
||||
else:
|
||||
link = "https://" + main_domain + small_article.find("a").get("href")
|
||||
if "/videos/" in link:
|
||||
print(f" Skipping {link} since it's a video")
|
||||
continue
|
||||
is_paid = len(small_article.find_all("span", class_="flagPaid")) > 0
|
||||
articles.append(Article(t, link, is_paid))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue