Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]webscraping shaders that aren't on API #27

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

Vipitis
Copy link
Collaborator

@Vipitis Vipitis commented Apr 5, 2024

This was considered in #25 however I am not sure we should include this.

It's really useful for debugging and testing, so I wanted to share this. Perhaps we can make this part of the optional dev dependencies? Basically looking for comments on this idea.

It works by spawning a browser, waiting for the shader to load and then calling a javascript function that produces almost exactly the same json as the api returns.

Pros:

  • 50k additional shaders accessible (public and unlisted, instead of just public+api). API gives access to slightly more than 35k
  • no API key required
  • less hassle than copy & paste

Cons:

  • maybe unethical, shader authors chose not to allow API access - and we just ignore that. (it's always possible to fork a shader and then download it, or make your fork available on api)
  • additional dependencies: selenium, some webdriver
  • additional setup required: webdriver available
  • more maintaince: different browsers, website might change...

Perhaps there is also better implementation for this

@Korijn
Copy link
Contributor

Korijn commented Apr 5, 2024

If you're able to get the info with just an HTTP request that could reduce the required dependencies.

You can also try to disable JS and see if the page is rendered differently.

I do think that this is entering a legal grey area, just because you can scrape it does not mean it's allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants