fix regex to parse new URLs

This commit is contained in:
Aaron Fischer 2024-03-11 22:10:46 +01:00
parent e266cd9868
commit 2b7c578a34
2 changed files with 2 additions and 2 deletions

View file

@ -87,7 +87,7 @@ func getItems(filename string) []Item {
currentYear := "" currentYear := ""
currentMonth := 0 currentMonth := 0
re := regexp.MustCompile(`^[^[]+ \[(?P<author>[^"]+)"(?P<title>[^"]+)"]\([^=]+=(?P<isbn>[0-9]+).*$`) re := regexp.MustCompile(`^[^[]+ \[(?P<author>[^"]+)"(?P<title>[^"]+)"]\(.+buchhandel\.de\/buch\/(?P<isbn>[0-9]+).*$`)
yearRe := regexp.MustCompile(`^## (?P<year>20[0-9]{2})$`) yearRe := regexp.MustCompile(`^## (?P<year>20[0-9]{2})$`)
var yearBucket []Item var yearBucket []Item

View file

@ -24,7 +24,7 @@
<div id="covers"> <div id="covers">
{{ range .Items }} {{ range .Items }}
<div class="cover-item"> <div class="cover-item">
<a target="_blank" href="https://www.buchhandel.de/buch/{{ .ISBN }}"><img src="/covers/{{ .ISBN }}.jpg" alt="{{ .Author | html }} - {{ .Title | html }}" title="zu yourbook.shop" /></a> <a target="_blank" href="https://www.buchhandel.de/buch/{{ .ISBN }}"><img src="/covers/{{ .ISBN }}.jpg" alt="{{ .Author | html }} - {{ .Title | html }}" title="zu buchhandel.de" /></a>
</div> </div>
{{ end }} {{ end }}
</div> </div>