Skip to content

Add LeetCode Search plugin - #705

Open
ErenMFYeager wants to merge 3 commits into
Flow-Launcher:mainfrom
ErenMFYeager:patch-1
Open

Add LeetCode Search plugin#705
ErenMFYeager wants to merge 3 commits into
Flow-Launcher:mainfrom
ErenMFYeager:patch-1

Conversation

@ErenMFYeager

Copy link
Copy Markdown

Adds plugin manifest for LeetCode Search — fuzzy search, topic/difficulty filters, daily challenge, and local caching for LeetCode problems.

@ErenMFYeager

Copy link
Copy Markdown
Author

Hi @jjw24, opened a fresh PR with just the plugin manifest file as suggested — should be clean now. Let me know if anything else is needed!

@jjw24 jjw24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, it's missing lib directory for your imports, so getting this when using the plugin:
{0DFE8631-A3AF-44A9-B1B6-44F07C70834B}

@ErenMFYeager

Copy link
Copy Markdown
Author

Hey, sorry about that, my bad. Turns out the lib/ folder with all the dependencies was gitignored so it never actually made it into the build, and I'd also forgotten to add rapidfuzz to requirements.txt. Fixed both, bumped it to v1.4.3, cleaned up the release zip, and updated the manifest here to point to the right version and download link. Tested it on my own Flow Launcher and it's working now. Would you mind pulling the latest and giving it another shot?

@deefrawley

Copy link
Copy Markdown
Member

Hi, can you also ensure you aren't breaching leetcode terms and conditions with the way you grab the data in the background? Thanks

@ErenMFYeager

Copy link
Copy Markdown
Author

Hey @deefrawley, thanks for calling this out, it's a legitimate concern., The indexing worker is scraping LC's unofficial graphql endpoint pretty aggressively in the background, that's a legit ToS issue.

Here's what I am thinking of doing reduce the load on LC's servers:

  • Gonna ship problems_cache.json bundled with every release instead of indexing on first run. So a fresh install just has the data already, no hitting their servers at all on install.
  • I'll cut a new release roughly every 15 days to refresh that cache. Doing it manually on my end, not something that runs on a user's machine. New questions mostly drop on weekends anyway and it's like 4 questions, I doubt anyone's missing them for two weeks when the rest of the library is already huge.
  • Rate-limiting lc refresh to once a day or maybe once a week so people can't just spam it and turn it back into a mini-scraper.

Let me know if that's enough or if you want more. Since I have to encounter my exams in few days, I won't be able to do major changes right now, but would love to figure out how to remove or reduce this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants