fix social links for users

このコミットが含まれているのは:
Arya Kiran 2023-03-15 16:44:47 +05:30
コミット ec3db8dc18
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 842D12BDA50DF120
2個のファイルの変更12行の追加12行の削除

ファイルの表示

@ -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 {

ファイルの表示

@ -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")