add localtime
このコミットが含まれているのは:
コミット
7a130bf8cc
|
@ -21,6 +21,7 @@ type User struct {
|
|||
Bio string
|
||||
AvatarUrl string
|
||||
Location string
|
||||
Timezone string
|
||||
Following int64
|
||||
Followers int64
|
||||
Link string
|
||||
|
@ -138,6 +139,7 @@ func HandleUser(c *fiber.Ctx) error {
|
|||
// Metadata (Location/Workplace/Website/Twitter etc.)
|
||||
sc.OnHTML("ul.vcard-details", func(e *colly.HTMLElement) {
|
||||
Scrape.Location = e.ChildText("li[itemprop*='homeLocation'] span")
|
||||
Scrape.Timezone = e.ChildText("li[itemprop*='localTime'] span")
|
||||
Scrape.Company = e.ChildText("li[itemprop*='worksFor'] span")
|
||||
Scrape.EwTwitter = e.ChildText("a[href*='https://twitter.com/' i]")
|
||||
})
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
{{ end }}
|
||||
{{ if .Timezone }}
|
||||
<p>🕑️ {{.Timezone}}</p>
|
||||
{{ end }}
|
||||
{{ if .Link }}
|
||||
<p>🔗 <a href="https://{{.Link}}" target="_blank">{{.Link}}</a></p>
|
||||
{{ end }}
|
||||
|
|
読み込み中…
新しいイシューから参照