Skip to content

Commit

Permalink
derp, forgot https
Browse files Browse the repository at this point in the history
  • Loading branch information
twilwa committed Jul 9, 2024
1 parent 9f09b46 commit 96cf574
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/crawler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ local function get_visual_selection()
end

local function process_url(url, render_type)
local prefix = render_type == 'markdown' and 'r.jina.ai/' or 'jsondr.com/'
local full_url = prefix .. url
local prefix = render_type == 'markdown' and 'https://r.jina.ai/' or 'https://jsondr.com/'
local full_url = prefix .. url:gsub("^https?://", "")
print("Fetching URL: " .. full_url) -- Debug log
local response = curl.get(full_url)

Expand All @@ -68,7 +68,7 @@ local function process_sitemap(url)
end

local function process_search(query)
local search_url = 's.jina.ai/' .. vim.fn.shellescape(query)
local search_url = 'https://s.jina.ai/' .. vim.fn.shellescape(query)

job:new({
command = "curl",
Expand Down

0 comments on commit 96cf574

Please sign in to comment.