High-Speed Website Screenshots with Python [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I need to take screenshots of a website continuously and pipe these data into a python array as fast as possible. Desirable would be at least 30 fps. It would be nice to have one screenshot/frame per function call, because I have to inject some JavaScript to the website after each frame.
The website is running a webgl canvas and is expecting keyboard input.
I already tried to make it with selenium and headless Firefox, but this is way too slow. What do you think is the best way to go to get close to my requirements?
Thanks in advance.

I would recommend to use Python MSS. This library is intended exactly to take screenshots really fast. It is currently maintainable and cross-platform, and has good documentation.

Related

If you release a browser game to the web. How do you prevent people from making a copy out of your game? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 months ago.
Improve this question
Apologies in advance if I'm missing something obvious here. But to my knowledge, all the code: css, html and JS, are available to anyone visiting your website (or playing your game on the web). How do they prevent people from stealing the original content?
You can use obfuscating tools to make your code less readable.
Also it's possible to make it harder to open devtools on your website.
But it is still not enough. You cannot just prevent somebody from doing something on the Internet. Everything you release to the web is accessible and copyable.

How to block screenshot using JS on Mobile iOS/Android? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to stop the screenshot event on mobile using JavaScript, because on PC is easier, I used only the event keyCode == 44 to stop.
Thanks a lot.
This is not possible, hence screenshot thing is iOS native features and independent to any app, you can not stop taking screenshot by coding for app.
You can prevent user from taking screenshots with Flags in Android
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
There is another solution for IOS devices where you can prevent taking screenshots programatically but I don't think there is a solution with JS.
EDIT: Those solutions for the applications not for a website!

track eye by tracking.js [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I recently found recently the JavaScript library - tracking.js
Is there any way to detect what div I see now by image or camera?
I have two elements on the desktop, the left and right columns, and I would like to check if I see left div ( with console.log() ) or right div. This library is simple, and I know how to add a script, but I don't know how to detect my eye and detect what element I see.
Maybe there are other ways to detect this.
Thats a bit complicated because you need detect minimal ocular movements and the common webcams, haven't resolution enough, but with some hardware like this project http://pupil-labs.com/pupil/, could do that.
A good solution is tracking.js because this library simulate human behavior with a some algorithms and should be enough to make simple decisions like the columns position.

AJAX Microgames [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
If you're not familiar with the concept of a Microgame, check out this video of WarioWare Twisted.
I'm interested in setting up a site where users can play series of browser-based Microgames which are delivered to them by a server. Ideally this would allow me to crowdsource the games and have an open submission system. What sort of scheme could I use to make this work?
I'm thinking that one way to do it would be to have each game consist of:
A javascript file that defines a MicroGame object that controls a rectangular portion of the screen, gets input and timing information from the main page, then calls back to the main page with a "Success" or "Failure" message.
A folder of assets that must be downloaded before the game executes.
Is this possible to do, client-side within a browser? Where would be a good place to start figuring this out?
There are a lot of open issues here. The biggest problem is what language do they submit games in which you can execute safely on the players machines? That said, there are tools like this out there. You could look at the excellent Play My Code for inspiration.

How to get the data I need from airbnb web page? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to get the dates booked and price from the the airbnb page: https://www.airbnb.com.sg/rooms/2781352 under the "Calendar" tab of it.
I am quite newbie to this, and I want to python to do that, can I?
And what else should learn, javascript, PHP?
For extracting data from web pages, my first stop is Beautifulsoup. It is designed for just this purpose, and is excellent at it. Combine it with the great requests HTTP library (so much better and easier than urllib/urllib2/etc.) for getting the pages.
Both of these are Python modules, there is no need to learn any other programming languages to do it, although it greatly helps to have an understanding of HTML and DTDs (Document Type Definitions) for setting up paths.

Categories