From 7a130bf8cca3ffb2e0d219d76ee9beeb72d658ad Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Wed, 8 Feb 2023 19:25:03 +0530 Subject: [PATCH] add localtime --- pages/user.go | 2 ++ views/user.html | 1 + 2 files changed, 3 insertions(+) diff --git a/pages/user.go b/pages/user.go index cad1318..d1fdc40 100644 --- a/pages/user.go +++ b/pages/user.go @@ -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]") }) diff --git a/views/user.html b/views/user.html index 6f007ef..e8d6fd0 100644 --- a/views/user.html +++ b/views/user.html @@ -22,6 +22,7 @@ {{ end }} {{ if .Timezone }}

🕑️ {{.Timezone}}

+ {{ end }} {{ if .Link }}

🔗 {{.Link}}

{{ end }}