fix Scrape.Readme

This commit is contained in:
Arya Kiran
2023-03-21 23:50:39 +05:30
parent 7fdfae7164
commit de7d99140b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ func DirView(c *fiber.Ctx) error {
sc := colly.NewCollector(colly.AllowedDomains("github.com"), colly.UserAgent(UserAgent))
sc.OnHTML("div#readme", func(e *colly.HTMLElement) {
Scrape.Readme = e.ChildText("a[href*='#readme']")
Scrape.Readme = e.ChildText("a[href='#readme']")
})
sc.OnHTML("div.js-details-container div.Details-content--hidden-not-important", func(e *colly.HTMLElement) {
e.ForEach("div.js-navigation-item", func(i int, el *colly.HTMLElement) {
+1 -1
View File
@@ -79,7 +79,7 @@ func HandleRepo(c *fiber.Ctx) error {
})
})
sc.OnHTML("div#readme", func(e *colly.HTMLElement) {
Scrape.Readme = e.ChildText("a[href*='#readme']")
Scrape.Readme = e.ChildText("a[href='#readme']")
})
sc.OnHTML("div.BorderGrid-cell ul.list-style-none", func(e *colly.HTMLElement) {
e.ForEach("li.d-inline .d-inline-flex", func(i int, el *colly.HTMLElement) {