-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtechno_report_settings.py
More file actions
54 lines (51 loc) · 2.67 KB
/
techno_report_settings.py
File metadata and controls
54 lines (51 loc) · 2.67 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
from dataclasses import dataclass
from models import RssInfo, SiteConfig
from app_config import FetchConfig
@dataclass(frozen=True)
class BandcampFetchConfig(FetchConfig):
"""
Bandcamp-specific fetch configuration.
Inherits from FetchConfig with Bandcamp-specific settings.
"""
needs_selenium: bool = True
needs_tor: bool = False
post_container: str = ".music-grid-item"
title_selector: str = ".title"
link_selector: str = "a"
link_attr: str = "href"
filter_pattern: str = None
use_random_user_agent: bool = False
published_selector: str = ".date"
CONFIG = SiteConfig(
ALL_URLS = {
"http://detroiteq.com/feed": RssInfo("deq.webp", "Detroit Electronic Quarterly", "http://detroiteq.com/"),
"https://www.google.com/alerts/feeds/12151242449143161443/18325972585468687530": RssInfo("Google-NewsTechno.webp", "Google Detroit Techno news", "https://news.google.com/search?q=detroit techno"),
"https://rocksteadydisco.bandcamp.com/fakefeed": RssInfo("RockSteadyDisco.webp", "RockSteady Disco", "https://rocksteadydisco.bandcamp.com"),
"https://transmatdetroit.bandcamp.com/fakefeed": RssInfo("Transmat.webp", "Transmat", "https://transmatdetroit.bandcamp.com"),
"https://pitsdetroit.bandcamp.com/fakefeed": RssInfo("pits.webp", "Place In Time And Space", "https://pitsdetroit.bandcamp.com/"),
"https://planetecommunications.bandcamp.com/fakefeed": RssInfo("planete.webp", "Planet-E Communications", "https://planetecommunications.bandcamp.com"),
"https://womenonwax.com/feed/": RssInfo("womenonwax.webp", "Women On Wax", "https://womenonwax.com"),
},
USER_AGENT = "The Detroit Techno Report -- http://news.thedetroitilove.com/",
SITE_URLS = [
"http://detroiteq.com/feed",
"https://www.google.com/alerts/feeds/12151242449143161443/18325972585468687530",
"https://rocksteadydisco.bandcamp.com/fakefeed",
"https://womenonwax.com/feed/",
"https://transmatdetroit.bandcamp.com/fakefeed",
"https://planetecommunications.bandcamp.com/fakefeed",
"https://pitsdetroit.bandcamp.com/fakefeed",
],
URL_IMAGES = "http://news.thedetroitilove.com/static/images/",
FAVICON = "technoreport.ico",
LOGO_URL = "TechnoReport.webp",
WEB_DESCRIPTION = "Detroit Techno, Arts and Events News",
WEB_TITLE = "The Detroit Report | Latest Detroit Techno News",
REPORT_PROMPT = "Detroit techno fans, DJs, producers, and labels interested in significant Detroit techno news, releases, and events.",
PATH = "/srv/http/flask",
SCHEDULE = [0],
DEFAULT_THEME="paper",
CUSTOM_FETCH_CONFIG={
"bandcamp.com": BandcampFetchConfig(),
}
)