fix social links for users

This commit is contained in:
Arya Kiran
2023-03-15 16:44:47 +05:30
parent b49c9ca666
commit ec3db8dc18
2 changed files with 12 additions and 12 deletions
+11 -11
View File
@@ -8,17 +8,17 @@ import (
)
type PrivacyInfo struct {
IPAddr string
ReqURL string
UserAgent string
Diagnostics string
Country string
Provider string
Cloudflare string
PrivacyPolicy string
Version string
GoVersion string
FiberVersion string
IPAddr string
ReqURL string
UserAgent string
Diagnostics string
Country string
Provider string
Cloudflare string
PrivacyPolicy string
Version string
GoVersion string
FiberVersion string
}
func HandleAbout(c *fiber.Ctx) error {
+1 -1
View File
@@ -102,7 +102,7 @@ func HandleUser(c *fiber.Ctx) error {
Scrape.Company = e.ChildText("li[itemprop*='worksFor'] span")
Scrape.Link = e.ChildText("li[itemprop*='url'] a")
e.ForEach("li[itemprop*='social']", func(i int, el *colly.HTMLElement) {
Scrape.Social = append(Scrape.Social, el.ChildText("a.Link--primary"))
Scrape.Social = append(Scrape.Social, el.ChildAttr("a.Link--primary", "href"))
})
// Followers/Following
Scrape.Followers = e.ChildText("a[href*='https://github.com/" + c.Params("user") + "?tab=followers' i] span")