MCPcopy
hub / github.com/qeeqbox/social-analyzer / find_username_normal

Function find_username_normal

modules/fast-scan.js:9–30  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

7import engine from './engine.js'
8
9async function find_username_normal (req) {
10 helper.log_to_file_queue(req.body.uuid, '[init] Selected websites: ' + helper.websites_entries.filter((item) => item.selected === 'true').length + ' for username: ' + req.body.string)
11 const time = new Date()
12 let all_results = []
13 const [first_re_try, first_profiles] = await find_username_normal_wrapper(req, helper.websites_entries)
14 helper.verbose && console.log(`Total time ${new Date() - time}`)
15 const [second_re_try, second_profiles] = await find_username_normal_wrapper(req, first_re_try)
16 helper.verbose && console.log(`Total time ${new Date() - time}`)
17 const [third_re_try, third_profiles] = await find_username_normal_wrapper(req, second_re_try)
18 helper.verbose && console.log(`Total time ${new Date() - time}`)
19 if (third_re_try.length > 0) {
20 const failed_sites = await get_failed(req, third_re_try)
21 all_results = Array.prototype.concat(first_profiles, second_profiles, third_profiles, failed_sites)
22 } else {
23 all_results = Array.prototype.concat(first_profiles, second_profiles, third_profiles)
24 }
25
26 all_results = all_results.filter(item => item)
27 return all_results.sort((first, second) => {
28 return helper.compare_objects(first, second, 'rate')
29 })
30}
31
32async function get_failed (req, failed) {
33 const temp_result = []

Callers

nothing calls this directly

Calls 2

get_failedFunction · 0.85

Tested by

no test coverage detected