fix regex to parse new URLs
This commit is contained in:
parent
e266cd9868
commit
2b7c578a34
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ func getItems(filename string) []Item {
|
|||
|
||||
currentYear := ""
|
||||
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})$`)
|
||||
|
||||
var yearBucket []Item
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<div id="covers">
|
||||
{{ range .Items }}
|
||||
<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>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue