MCPcopy
hub / github.com/drawrowfly/tiktok-scraper / proxyFromFile

Function proxyFromFile

src/entry.ts:56–67  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

54 * @param file
55 */
56const proxyFromFile = async (file: string) => {
57 try {
58 const data = (await fromCallback(cb => readFile(file, { encoding: 'utf-8' }, cb))) as string;
59 const proxyList = data.split('\n');
60 if (!proxyList.length) {
61 throw new Error('Proxy file is empty');
62 }
63 return proxyList;
64 } catch (error) {
65 throw error.message;
66 }
67};
68
69/**
70 * Load session list from a file

Callers 8

promiseScraperFunction · 0.85
getHashtagInfoFunction · 0.85
getMusicInfoFunction · 0.85
getUserProfileInfoFunction · 0.85
signUrlFunction · 0.85
getVideoMetaFunction · 0.85
videoFunction · 0.85
fromfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected