mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 09:05:33 +00:00
add lastBuildDate for channel
This commit is contained in:
parent
33007b7f9a
commit
3b71a2a2ec
1 changed files with 5 additions and 1 deletions
|
|
@ -34,9 +34,13 @@ impl Rss {
|
|||
b"<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss version=\"2.0\"><channel>",
|
||||
)?;
|
||||
|
||||
let t = chrono::Utc::now().to_rfc2822();
|
||||
file.write_all(b"<pubDate>")?;
|
||||
file.write_all(chrono::Utc::now().to_rfc2822().as_bytes())?;
|
||||
file.write_all(t.as_bytes())?;
|
||||
file.write_all(b"</pubDate>")?;
|
||||
file.write_all(b"<lastBuildDate>")?;
|
||||
file.write_all(t.as_bytes())?;
|
||||
file.write_all(b"</lastBuildDate>")?;
|
||||
|
||||
file.write_all(b"<title>")?;
|
||||
file.write_all(escape(title).as_bytes())?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue