linkedin-secret-sauce 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/linkedin-api.js +2 -17
- package/package.json +1 -1
package/dist/linkedin-api.js
CHANGED
|
@@ -196,23 +196,8 @@ async function searchSalesLeads(keywords, options) {
|
|
|
196
196
|
catch { }
|
|
197
197
|
return out;
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
raw = await doRequest(deco);
|
|
202
|
-
}
|
|
203
|
-
catch (e) {
|
|
204
|
-
if ((e?.status ?? 0) === 400) {
|
|
205
|
-
const fallback = deco.replace(/LeadSearchResult-\d+/, 'LeadSearchResult-17');
|
|
206
|
-
try {
|
|
207
|
-
(0, logger_1.log)('warn', 'api.decoFallback', { from: deco, to: fallback });
|
|
208
|
-
}
|
|
209
|
-
catch { }
|
|
210
|
-
raw = await doRequest(fallback);
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
throw e;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
199
|
+
// Use only the specified decoration ID - no fallbacks to ensure consistent data structure
|
|
200
|
+
const raw = await doRequest(deco);
|
|
216
201
|
const items = (0, search_parser_1.parseSalesSearchResults)(raw);
|
|
217
202
|
const rrec = (raw && typeof raw === 'object') ? raw : undefined;
|
|
218
203
|
const pagingVal = rrec && 'paging' in rrec ? rrec.paging : undefined;
|