dawsbot / eth-labels

📃 A public dataset of crypto addresses labeled
https://eth-labels-production.up.railway.app/swagger
MIT License
190 stars 29 forks source link

[Feat] Generalized scraper for all labels (SeleniumJS) #13

Closed brianleect closed 5 months ago

brianleect commented 2 years ago

Flow

  1. In terminal, node scrape-all for all labels or node scrape-all labelName for single label retrieval
  2. Login to etherscan
  3. Extract all labels from labelcloud
  4. Checks for existing label.json in src/mainnet/all-json which are filtered out
  5. Checks for ignore_list labels which are hardcoded in for being too large (100k+ labels) or bugged (no values)
  6. Loop through filteredLabels and save each label to src/mainnet/all-json as ${label}.json
dawsbot commented 2 years ago

WOW, this is an epic contribution @brianleect 🙏

Is this ready for PR review? I know we've been chatting over in discord about the importance of separating labels to separate files. If all labels are in one file, you cannot split it properly and therefore have massive bundle sizes.

Thanks again! Excited to join forces here 🎉

brianleect commented 2 years ago

Noticed a bug. Some labels apparently are empty. Not sure if its caused by scraping too quickly?

brianleect commented 2 years ago

image

Wrote a quick script to check. Apparently 186 labels impacted. I'll try to see if re-running the scraper fixes the problem or introducing a delay.

brianleect commented 2 years ago

Fixed the empty labels. Seems there's also some weird issue going on with label scraping where inconsistent labels are getting scraped. Had occasion where I ended up with ~370 labels scraping all and ended up managing to scrape up to 400 labels total on a second run.

Might need to test if we are getting consistent number of labels back from labelcloud and if so, might have an issue elsewhere.

dawsbot commented 2 years ago

Thanks for the comments on all this @brianleect 🙏

I'll take a look soon. I appreciate the patience, I was offline a lot for EthMexico where I competed 🙌

dawsbot commented 5 months ago

We've got a big refactor underway already which replaces the need for SeleniumJS. Thank you for this issue @brianleect, we've decided on a different path that's working well for now! 🙏