Conversaciones » Desarrolladores

How to Save/Send information from my scripts to myself?

§
Publicado: 02/01/2024
Editado: 02/01/2024

This is helpful in a bunch of cases, like knowing the website username of who has my script installed, or knowing the main language or system/browser information so that I can run more tests and try it by myself on my own PC, so I improve its usage on the most popular/browser/system used by the users of my script.

Also, what I really want to do is like make a DB sort of thing, so that a small portion of data that 1 single user generates can be sent to me or somewhere, and that is the same for all other users of my script. This is very helpful in my case because most of my scripts make API requests and scrape websites, so for example, if 1 user fetched and scraped page ID 99, all other users could connect to my "DB" and then no one else would have to fetch page ID 99, because the data was already stored and sent to me/my server/DB, which could save the bandwidth of all of my script users. Also, the website that I usually scrape and APIs that I use, have a very low usage rate limit so sometimes I and my users keep seeing an anti-bot screen asking to wait or solve a puzzle simply because less than 50 network requests were made or so...

I can't think of any good ideas for how to get the data sent to me. besides making some kind of POST request to a URL/Website I own, the issue is I do not want to pay for anything or host it myself because I can't really keep a PC/Laptop or whatever on 24/7... Also, I can probably make it, but I would have to use an online account that I have somewhere, add my username/email and password on the script, login, and then add the data... Which I don't want to do because the users would be able to see my code and login and change the password, or change/delete all the saved data.

How do you guys do it? Or how can I do it without having to buy/pay for a website?

Is there a way to use my GitHub account to do that?

Thank you!

§
Publicado: 23/01/2024

Looks like I would have to use one of the services below, and hope that my script doesn't get popular, or else I would have to pay or self-host it.

https://anotepad.com/api
https://jsonblob.com/api
https://nhost.io/pricing
https://appwrite.io/pricing/
https://firebase.google.com/pricing
https://extendsclass.com/json-storage.html#apiDocumentation

Are there any other better options?

§
Publicado: 24/01/2024
Editado: 24/01/2024

you need to have a backend. userscript send request to the server, server side will know your IP etc and record it. all controlled by the server side.

You might need to combine with GM.getValue, localStorage.getItem, etc to ensure the identify remains the same if VPN is used.

cache_key provided -> update IP stored in server side (for VPN case)

cache_key not provided -> rely on IP checking in server side -> send cache_key back to you. your script need to set it to the storages

``
§
Publicado: 24/01/2024

I can't really keep a PC/Laptop or whatever on 24/7, but looks like the cloud-based methods here or self-host are the only options...

I thought that GitHub would somehow be useable for that...

I can't really keep a PC/Laptop or whatever on 24/7, but looks like the cloud-based methods here or self-host are the only options...

I thought that GitHub would somehow be useable for that...

Google App Engine is an option but it is not free.

§
Publicado: 25/01/2024

Thanks

§
Publicado: 09/03/2024
Editado: 09/03/2024

Thanks

That is nice.

Apparently google has a web console that would let me create that python script and run it there?
I just really don't want to store the server myself on my local machine...

Sad thing that OpenAI doesn't let me transfer and store the chat to my account

I was pretty sure that all I needed as an account on firebase, I thought setting it up and making a python code for it would be neddless...

Publicar respuesta

Inicia sesión para responder.