-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved GitLab data source and ported Searchcode source to API usage
- Loading branch information
Showing
5 changed files
with
57 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Copyright 2021 Jeff Foley. All rights reserved. | ||
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. | ||
|
||
name = "Searchcode" | ||
type = "api" | ||
|
||
function start() | ||
set_rate_limit(2) | ||
end | ||
|
||
function vertical(ctx, domain) | ||
for i=0,49 do | ||
local ok = scrape(ctx, {['url']=build_url(domain, i)}) | ||
if not ok then | ||
return | ||
end | ||
end | ||
end | ||
|
||
function build_url(domain, pagenum) | ||
return "https://searchcode.com/api/codesearch_I/?per_page=100&q=." .. domain .. "&p=" .. pagenum | ||
end |
This file was deleted.
Oops, something went wrong.