Jump to content
Ketarin forum

Kuppet : Javascript rendered pages for Ketarin


Recommended Posts

PswP11w.png

Download Link

Kuppet update, 14 September 2021 :
- Upgraded chrome to v93.
- Fixed failure to deal properly with favicon and third-party js requests - causing failure to return and exit.
- Now returns text/plain not text/html.
- Log indicates which urls are rejected(i.e. missing https:// at start).
- Increased default timeout to 10 seconds, after successful request.
- Added working example to post.

Logitech_Options.xml

Edited by Ambimind
New version of kuppet uploaded
Link to post
Share on other sites
  • 4 weeks later...
  • 1 month later...

Thanks for clearly reporting your problem, jusseppe.
Please try the new version I've uploaded(see original post); I think I've found the cause of the error - entirely my fault.
Also, see the working example I've uploaded.

An alternative resolution : If your firewall is not blocking chrome and\or kuppet, you can try changing kuppets default working port :
cs4i4MS.jpg

Tip : If you remove "-WindowStyle hidden" from the command line, kuppet will tell you a short story ;)

Link to post
Share on other sites
  • 1 month later...
  • 1 month later...

Hi, @jusseppe!

I've had a chance now to try this myself and the biggest issue was that the alternate port I attempted to use would not work until I closed and reopened Ketarin. This made all the difference for me. I've pasted the exact text you'll want to use in the "global variables" feature below to make it easier to ensure it is correct.

For the variable named "run_kuppet":

if(!(PS kuppet -ea 0)) {START -WindowsStyle hidden BIN\kuppet 8008}

Or, alternatively, use this to show the log as it happens:

if(!(PS kuppet -ea 0)) {START BIN\kuppet 8008}

For the variable named ">":

{run_kuppet:ps}http://localhost:8008/

 

Link to post
Share on other sites

@Ambimind - this is fantastic. Thank you!

Can I request a feature? It looks like (according to the log) that it is re-requesting the same URLs repeatedly with each instance of a variable that makes a request. Is it possible to make Kuppet cache the results temporarily until it has moved on to the next Application? Since I gather a lot of content from some pages this could save me a LOT of repeat requests.

Are there other switches than the port that it runs on?

Link to post
Share on other sites

It is caching - yay! I didn't read the log very carefully. 

It looks like the parameters are:

kuppet.exe [port] [timeout-ms]

It disconnects if idle for 30s or more no matter what.

It's using the following user-agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.63 Safari/537.36

Can you make it possible to change the user-agent? Some sites block HeadlessChrome by default.

Link to post
Share on other sites

The cache appears to only survive about 10 seconds - so on a large download or on a slow site, it may not keep the cache long enough for the post-update scripts to run without re-downloading the variable webpages. I've changed the command used to extend the timeout to:

if(!(PS kuppet -ea 0)) {START -WindowsStyle hidden BIN\kuppet "8008 30000"}

This increases the timeout to 30 seconds and resolves my immediate problem, but it will not accept any value above 30000 (30s). I suspect there is a hard limit in place to ensure that Kuppet doesn't stay in memory forever. Unfortunately, this forces some applications to re-request data in order to perform my post-update scripts. I guarantee on some sites (just experienced it with SnagIt) this will become a problem. Re-requesting pages can get you throttled with a recaptcha or cloudflare stall. Grrrr.

Please increase the hard limit to 5m or more, and/or allow us to configure caching on an execution basis. Maybe allow Kuppet to run without a hard limit (timeout=0)  - and use the timeout only in relation to the cache duration. I leave Ketarin open 24/7 anyway so there's no reason I can think of to close Kuppet any more frequently than I reboot (once per month or so).

Something like this:

kuppet.exe [port] [cache-timeout-ms] [hard-limit-ms] [custom-user-agent]

Thanks, again, @Ambimind - this has already resolved problems I've been having with about a dozen Applications.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.