Compare commits
2 Commits
f7b6600089
...
7035f3e72e
Author | SHA1 | Date | |
---|---|---|---|
7035f3e72e
|
|||
f6f47bb9a2
|
@ -1,5 +1,14 @@
|
||||
# wutheringwaves
|
||||
|
||||
## RSS Feeds
|
||||
|
||||
Stay updated with the latest Wuthering Waves news through these RSS feeds:
|
||||
|
||||
- **[Latest Articles](https://git.lovinator.space/TheLovinator/wutheringwaves/raw/branch/master/articles_latest.xml)** - Contains the 20 newest entries (recommended for regular updates)
|
||||
- **[Complete Archive](https://git.lovinator.space/TheLovinator/wutheringwaves/raw/branch/master/articles_all.xml)** - Access all published articles (approximately 1 MB)
|
||||
|
||||
*Subscribe to these feeds in your favorite RSS reader to automatically receive new announcements.*
|
||||
|
||||
## Articles
|
||||
|
||||
- [[Chord Cleansing] Limited-Time Echo Double Drop Event](https://wutheringwaves.kurogames.com/en/main/news/detail/2584) [[json]](articles/2584.json)
|
||||
|
7340
articles_all.xml
7340
articles_all.xml
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10
scrape.py
10
scrape.py
@ -294,8 +294,12 @@ def strip_unsafe_tags(content: str) -> str:
|
||||
str: The cleaned HTML content.
|
||||
|
||||
"""
|
||||
sanitizer = Sanitizer()
|
||||
return sanitizer.sanitize(content) # pyright: ignore[reportUnknownVariableType, reportUnknownMemberType]
|
||||
sanitizer = Sanitizer({
|
||||
"tags": {"a", "br", "b", "strong", "i", "em", "code", "s", "strike", "del", "u"},
|
||||
"empty": {"a", "br"},
|
||||
"separate": {"br"},
|
||||
})
|
||||
return sanitizer.sanitize(content.replace("\n", "<br>")).replace("<br>", "\n") # pyright: ignore[reportUnknownVariableType, reportUnknownMemberType]
|
||||
|
||||
|
||||
def generate_atom_feed(articles: list[dict[Any, Any]], file_name: str) -> str:
|
||||
@ -355,7 +359,7 @@ def generate_atom_feed(articles: list[dict[Any, Any]], file_name: str) -> str:
|
||||
<id>{entry_id}</id>
|
||||
<title>{escape(article_title)}</title>
|
||||
<link href="{article_url}" rel="alternate" type="text/html"/>
|
||||
<content type="html">{escape(article_content)}</content>
|
||||
<content type="html">{escape(article_content.strip())}</content>
|
||||
{published}
|
||||
<updated>{updated}</updated>
|
||||
{category}
|
||||
|
Reference in New Issue
Block a user