fix Scrape.Readme
このコミットが含まれているのは:
コミット
de7d99140b
|
@ -57,7 +57,7 @@ func DirView(c *fiber.Ctx) error {
|
||||||
|
|
||||||
sc := colly.NewCollector(colly.AllowedDomains("github.com"), colly.UserAgent(UserAgent))
|
sc := colly.NewCollector(colly.AllowedDomains("github.com"), colly.UserAgent(UserAgent))
|
||||||
sc.OnHTML("div#readme", func(e *colly.HTMLElement) {
|
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) {
|
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) {
|
e.ForEach("div.js-navigation-item", func(i int, el *colly.HTMLElement) {
|
||||||
|
|
|
@ -79,7 +79,7 @@ func HandleRepo(c *fiber.Ctx) error {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
sc.OnHTML("div#readme", func(e *colly.HTMLElement) {
|
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) {
|
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) {
|
e.ForEach("li.d-inline .d-inline-flex", func(i int, el *colly.HTMLElement) {
|
||||||
|
|
読み込み中…
新しいイシューから参照