handle google url redirect in page crawler

This commit is contained in:
Nazar Kanaev
2022-08-21 13:31:03 +01:00
parent b935a1c511
commit 698f5d6d06
4 changed files with 45 additions and 1 deletions

View File

@@ -456,6 +456,9 @@ func (s *Server) handleOPMLExport(c *router.Context) {
func (s *Server) handlePageCrawl(c *router.Context) {
url := c.Req.URL.Query().Get("url")
if newUrl := silo.RedirectURL(url); newUrl != "" {
url = newUrl
}
if content := silo.VideoIFrame(url); content != "" {
c.JSON(http.StatusOK, map[string]string{
"content": sanitizer.Sanitize(url, content),