Improve XML formatting

This commit is contained in:
2026-01-04 13:51:19 -05:00
parent aa9462bad6
commit bcbf59a98b
2 changed files with 6 additions and 8 deletions
+2 -4
View File
@@ -1,10 +1,8 @@
<input> <input>
<flareSolverrURL>http://PLACEHOLDER:8191/v1</flareSolverrURL> <flareSolverrURL>http://PLACEHOLDER:8191/v1</flareSolverrURL>
<loadSeconds>1</loadSeconds>
<regex <regex
><![CDATA[ ><![CDATA[<ce-search-result class=\\"card rounded-none bg-base-100 shadow-xl\\"><!----><!----><div class=\\"flex\\"><img alt=\\"Album art\\" loading=\\"lazy\\" class=\\"object-cover w-40\\" src=\\".*?\\"><!----><div class=\\"flex-grow p-3\\"><div class=\\"text-xl \[text-wrap:balance\] sm:text-2xl\\">(.*?)<\/div><!----><div><span class=\\"text-sm font-bold \[text-wrap:balance\] sm:text-base\\">Album:<\/span> (.*?)<\/div><div><span class=\\"text-sm font-bold \[text-wrap:balance\] sm:text-base\\">Genre:<\/span> .*?Charter:<\/div><a target=\\"_blank\\" class=\\"link-hover link\\" href=\\".*?\\">(.*?)<\/a><\/div><!----><!----><!----><!---->.*?for=\\"downloadVideos_(.*?)\\"]]></regex>
<ce-search-result class=\\"card rounded-none bg-base-100 shadow-xl\\"><!----><!----><div class=\\"flex\\"><img alt=\\"Album art\\" loading=\\"lazy\\" class=\\"object-cover w-40\\" src=\\".*?\\"><!----><div class=\\"flex-grow p-3\\"><div class=\\"text-xl \[text-wrap:balance\] sm:text-2xl\\">(.*?)<\/div><!----><div><span class=\\"text-sm font-bold \[text-wrap:balance\] sm:text-base\\">Album:<\/span> (.*?)<\/div><div><span class=\\"text-sm font-bold \[text-wrap:balance\] sm:text-base\\">Genre:<\/span> .*?Charter:<\/div><a target=\\"_blank\\" class=\\"link-hover link\\" href=\\".*?\\">(.*?)<\/a><\/div><!----><!----><!----><!---->.*?for=\\"downloadVideos_(.*?)\\" <loadSeconds>1</loadSeconds>
]]></regex>
<maxFeedItems>10</maxFeedItems> <maxFeedItems>10</maxFeedItems>
<feed> <feed>
<title> <title>
+4 -4
View File
@@ -32,9 +32,9 @@ type feedT struct {
AuthorEmail feedFieldInfoT `xml:"authorEmail"` AuthorEmail feedFieldInfoT `xml:"authorEmail"`
} }
type inputT struct { type inputT struct {
LoadSeconds float32 `xml:"loadSeconds"`
Regex string `xml:"regex"`
FlareSolverrURL string `xml:"flareSolverrURL"` FlareSolverrURL string `xml:"flareSolverrURL"`
Regex string `xml:"regex"`
LoadSeconds float32 `xml:"loadSeconds"`
MaxFeedItems int `xml:"maxFeedItems"` MaxFeedItems int `xml:"maxFeedItems"`
Feed feedT `xml:"feed"` Feed feedT `xml:"feed"`
} }
@@ -44,9 +44,9 @@ func main() {
if len(os.Args) < 2 { if len(os.Args) < 2 {
demoInputBytes, _ := xml.MarshalIndent( demoInputBytes, _ := xml.MarshalIndent(
inputT{ inputT{
LoadSeconds: 2.5,
Regex: "PLACEHOLDER",
FlareSolverrURL: "http://127.0.0.1:8191", FlareSolverrURL: "http://127.0.0.1:8191",
Regex: "PLACEHOLDER",
LoadSeconds: 2.5,
MaxFeedItems: 10, MaxFeedItems: 10,
Feed: feedT{ Feed: feedT{
Title: feedFieldInfoT{Parent: "Demo Title", CaptureGroupIndex: []int8{0}}, Title: feedFieldInfoT{Parent: "Demo Title", CaptureGroupIndex: []int8{0}},