Closed TomiLikesToCode closed 9 months ago
For me the same.
I tried multiple machine none of them worked, i wish knew the problem.
The issue is from cloudflare, you need to properly bypass the DDOS protection to get the correct HTML information
How?
I had the same problem when running using vagrant + virtualbox. When running on native windows it works.
Unable to reproduce, closing.
root@osboxes:/home/osboxes/csgo-tradeup-cli# node index --profit 110 --populs 10 --popSize 10 --spy --visualize Database is empty. Building database... Building the database. This may take a few minutes. Ctrl-C to cancel: 5 Ctrl-C to cancel: 4 Ctrl-C to cancel: 3 Ctrl-C to cancel: 2 Ctrl-C to cancel: 1 Clearing the database. Done. file:///home/osboxes/csgo-tradeup-cli/scrape.js:43 let all = [...dom.window.document.getElementsByClassName("navbar-nav")[0].children] ^
TypeError: Cannot read properties of undefined (reading 'children') at getGunsSources (file:///home/osboxes/csgo-tradeup-cli/scrape.js:43:78) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async getGunsData (file:///home/osboxes/csgo-tradeup-cli/scrape.js:64:22) at async updateDatabase (file:///home/osboxes/csgo-tradeup-cli/scrape.js:277:23) at async buildDatabase (file:///home/osboxes/csgo-tradeup-cli/db.js:41:5) at async checkEmptyDB (file:///home/osboxes/csgo-tradeup-cli/db.js:51:9) at async file:///home/osboxes/csgo-tradeup-cli/index.js:21:5
Node.js v18.7.0