This commit is contained in:
Arya Kiran
2023-04-27 12:31:51 +05:30
parent fa049697e7
commit 703c0ee63e
+2 -1
View File
@@ -73,7 +73,8 @@ func WikiView(c *fiber.Ctx) error {
})
sc.OnHTML("div#wiki-body > div.markdown-body", func(e *colly.HTMLElement) {
Content, _ := e.DOM.Html()
Scrape.PageContent = string(utils.UGCPolicy().SanitizeBytes([]byte(Content)))
Scrape.PageContent = strings.Replace(string(utils.UGCPolicy().SanitizeBytes([]byte(Content))), "https://github.com", "", -1)
})
sc.Visit("https://github.com/" + c.Params("user") + "/" + c.Params("repo") + "/wiki/" + c.Params("page"))
// Add scrape-based info to wikiArray