mirror of
https://codeberg.org/gothub/gothub
synced 2024-12-06 19:16:24 +01:00
fix social links for users
This commit is contained in:
+11
-11
@@ -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
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user