-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathai_report_settings.py
More file actions
66 lines (60 loc) · 3.53 KB
/
ai_report_settings.py
File metadata and controls
66 lines (60 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from dataclasses import dataclass
from models import RssInfo, SiteConfig
from app_config import RedditFetchConfig, FetchConfig
@dataclass(frozen=True)
class VentureBeatFetchConfig(FetchConfig):
"""
VentureBeat-specific fetch configuration.
Inherits from FetchConfig with VentureBeat-specific settings.
"""
needs_selenium: bool = True
needs_tor: bool = False
post_container: str = "article"
title_selector: str = "h2 a"
link_selector: str = "h2 a"
link_attr: str = "href"
filter_pattern: str = None
use_random_user_agent: bool = True
published_selector: str = "time"
CONFIG = SiteConfig(
ALL_URLS={
"https://www.reddit.com/r/LocalLlama/rising/.rss": RssInfo("LocalLlama.webp", "Machine Learning sub", "https://www.reddit.com/r/LocalLlama/"),
"https://www.theregister.com/software/ai_ml/headlines.atom": RssInfo("RegisterLogo.webp", "The Register AI News", "https://www.theregister.com/software/ai_ml/"),
"https://news.smol.ai/rss.xml": RssInfo("smol.webp", "Smol.ai News", "https://news.smol.ai/"),
"https://hnrss.org/newest?tags=ai": RssInfo("hackernews.webp", "YCombinator", "https://news.ycombinator.com/"),
"https://www.reddit.com/r/Python/rising/.rss": RssInfo("redditlogosmall.webp", "Reddit Python", "https://www.reddit.com/r/Python/"),
"https://planetpython.org/rss20.xml": RssInfo("Python-logo-notext.svg", "Planet Python", "https://planetpython.org/"),
"https://www.reddit.com/r/Grok/rising/.rss": RssInfo("Grok.gif", "Reddit Grok", "https://www.reddit.com/r/Grok/"),
"https://huggingface.co/blog/feed.xml": RssInfo("hf-logo.svg", "HuggingFace Blog", "https://huggingface.co/blog/"),
"https://feed.infoq.com/ai-ml-data-eng/": RssInfo("infoq.png", "InfoQ AI", "https://www.infoq.com/ai-ml-data-eng/"),
"https://futurism.com/categories/ai-artificial-intelligence/feed": RssInfo("futurism.svg", "Futurism", "https://futurism.com/categories/ai-artificial-intelligence"),
"https://www.google.com/alerts/feeds/12151242449143161443/8656080270874628454": RssInfo("Google-News.webp", "Google AI news", "https://news.google.com/search?q=AI Large Language Models"),
},
USER_AGENT="AI Report -- https://aireport.keithcu.com",
SITE_URLS=[
"https://hnrss.org/newest?tags=ai",
"https://www.reddit.com/r/LocalLlama/rising/.rss",
"https://www.google.com/alerts/feeds/12151242449143161443/8656080270874628454",
"https://futurism.com/categories/ai-artificial-intelligence/feed",
"https://huggingface.co/blog/feed.xml",
"https://www.theregister.com/software/ai_ml/headlines.atom",
"https://feed.infoq.com/ai-ml-data-eng/",
"https://planetpython.org/rss20.xml",
"https://www.reddit.com/r/Python/rising/.rss",
"https://www.reddit.com/r/Grok/rising/.rss",
"https://news.smol.ai/rss.xml",
],
URL_IMAGES="https://aireport.keithcu.com/static/images/",
FAVICON="covidreport192.ico",
LOGO_URL="AIReportNearspringwithafewsnowflakess.webp",
WEB_DESCRIPTION="Latest AI news: breakthroughs, trends, and tech for enthusiasts. Hourly updates, no fluff.",
WEB_TITLE="AI Report | Latest AI News",
REPORT_PROMPT="AI and robotics news for developers, researchers, and curious non-experts, focusing on the most important developments in AI and robots. Avoid generic fearmongering or any security or quantum computing topics",
PATH="/srv/http/aireport",
SCHEDULE=[7, 12, 17, 22],
DEFAULT_THEME="futuristic",
CUSTOM_FETCH_CONFIG={
"reddit.com": RedditFetchConfig(),
"venturebeat.com": VentureBeatFetchConfig()
}
)