fix (plg_backend_url): handle yet another apache format

This commit is contained in:
MickaelK 2025-09-09 00:55:14 +10:00
parent 0629060661
commit c15162c582

View file

@ -157,6 +157,7 @@ func (this Url) processLink(link string, n *html.Node) *File {
extractASPNetList, extractASPNetList,
extractApacheList, extractApacheList,
extractApacheList2, extractApacheList2,
extractApacheList3,
} { } {
if s, t, err := extr(n); err == nil { if s, t, err := extr(n); err == nil {
fSize = s fSize = s
@ -308,6 +309,12 @@ var extractApacheList2 = extract(
nodeApacheExtract, nodeApacheExtract,
) )
var extractApacheList3 = extract(
regexp.MustCompile(`([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2})`+`[ \xA0]+`+`([0-9]+(?:\.[0-9]+)?|-)`+`[ \xA0]*`+`[kKMGT]?`),
"2006-01-02 15:04",
nodeApacheExtract,
)
func (this *Url) Home() (string, error) { func (this *Url) Home() (string, error) {
return this.home, nil return this.home, nil
} }