NATION

PASSWORD

[q] is authitting the site without being logged in an issue?

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Homyland
Spokesperson
 
Posts: 161
Founded: Apr 25, 2020
Scandinavian Liberal Paradise

[q] is authitting the site without being logged in an issue?

Postby Homyland » Fri Dec 02, 2022 2:22 pm

So I'm working on a little browser-style program in Python, and to test if it works i just type up "nationstates.net" as the URL. I've only done this about 5 times right now. I am not logged in while doing this, however it's automatically going onto the site, sometimes in quick succession.

Can I get punished for this?

User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 27796
Founded: Dec 16, 2003
Capitalizt

Postby Frisbeeteria » Fri Dec 02, 2022 4:12 pm

I'm not sure what you're asking ("it's automatically going onto the site," isn't clear), but you don't need to be logged in to visit the site. People do it all the time.

User avatar
Chingis
Events Manager
 
Posts: 558
Founded: Apr 04, 2016
Inoffensive Centrist Democracy

Postby Chingis » Fri Dec 02, 2022 5:16 pm

Homyland wrote:So I'm working on a little browser-style program in Python, and to test if it works i just type up "nationstates.net" as the URL. I've only done this about 5 times right now. I am not logged in while doing this, however it's automatically going onto the site, sometimes in quick succession.

Can I get punished for this?


Technically speaking, the first time you visit each page in response to actually typing in the URL is perfectly legal, but any subsequent calls to the server until the next time you have some form of intentional user input, e.g. pressing a button or typing in a new URL should be rate limited at 10 calls per minute (and would be treated as automatic requests under the new site rules that Roavin published in this forum, once they come into power)
[violet] wrote:lol
My TGs are not for Mod business

User avatar
Kamchatska
Spokesperson
 
Posts: 174
Founded: Nov 29, 2022
Ex-Nation

Postby Kamchatska » Fri Dec 02, 2022 5:19 pm

If your just browsing through the forums and looking through Factbooks without being logged in, then you a perfectly fine.
Kamchatska is located in Eastern Siberia, the country has a population of 3.7 Million, the Countries Strong Economy is at 316.4 Billion GDP, with he Large City of Viktorgrad being the Capital, and the country is lead by its Current President, Petya Makarov.


NS Stats no Canon

The Viktorgrad Times: - Horrible Volcanic Eruptions take place, many lives ruined

User avatar
Homyland
Spokesperson
 
Posts: 161
Founded: Apr 25, 2020
Scandinavian Liberal Paradise

Postby Homyland » Sat Dec 03, 2022 12:52 am

Ty!

Here's 3 cookies for the 3 of you that helped.
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⡿⠿⠷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣇⠀⠀⢸⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣴⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀
⠀⠀⠀⢠⣿⡟⠁⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀
⠀⠀⢠⣿⣿⣿⣦⣄⣠⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣷⠀⠀⠀
⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢹⣿⣿⣿⡇⠀⠀
⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠀⠀
⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀
⠀⠀⠈⢿⣿⣿⣿⣿⠟⠻⣿⣿⠋⠀⠉⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⢙⣿⠃⠀⠀
⠀⠀⠀⠈⢿⣿⣿⠁⠀⠀⠘⣿⣆⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀
⠀⠀⠀⠀⠀⠙⢿⣦⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⢹⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⠿⣿⣿⣿⣷⡤⠾⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⡿⠿⠷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣇⠀⠀⢸⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣴⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀
⠀⠀⠀⢠⣿⡟⠁⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀
⠀⠀⢠⣿⣿⣿⣦⣄⣠⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣷⠀⠀⠀
⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢹⣿⣿⣿⡇⠀⠀
⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠀⠀
⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀
⠀⠀⠈⢿⣿⣿⣿⣿⠟⠻⣿⣿⠋⠀⠉⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⢙⣿⠃⠀⠀
⠀⠀⠀⠈⢿⣿⣿⠁⠀⠀⠘⣿⣆⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀
⠀⠀⠀⠀⠀⠙⢿⣦⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⢹⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⠿⣿⣿⣿⣷⡤⠾⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⡿⠿⠷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣇⠀⠀⢸⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣴⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀
⠀⠀⠀⢠⣿⡟⠁⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀
⠀⠀⢠⣿⣿⣿⣦⣄⣠⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣷⠀⠀⠀
⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⢹⣿⣿⣿⡇⠀⠀
⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠀⠀
⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀
⠀⠀⠈⢿⣿⣿⣿⣿⠟⠻⣿⣿⠋⠀⠉⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⢙⣿⠃⠀⠀
⠀⠀⠀⠈⢿⣿⣿⠁⠀⠀⠘⣿⣆⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀
⠀⠀⠀⠀⠀⠙⢿⣦⣤⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⢹⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⠿⣿⣿⣿⣷⡤⠾⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sat Dec 03, 2022 12:39 pm

Kamchatska wrote:If your just browsing through the forums and looking through Factbooks without being logged in, then you a perfectly fine.
No you're not. The main purpose of the ratelimit (the main ratelimit, anyway, not the separate ratelimit for API telegrams) is to avoid putting excess load on the server, not to avoid giving some players an undue advantage, so it still applies when not logged in. The vast majority of NationStates scripts gather data that does not require being logged in to see.

Homyland wrote:So I'm working on a little browser-style program in Python, and to test if it works i just type up "nationstates.net" as the URL. I've only done this about 5 times right now. I am not logged in while doing this, however it's automatically going onto the site, sometimes in quick succession.
What is your program actually meant to do? Is its main purpose not actually related to NationStates and you're just randomly testing it on NationStates because that was the first site you could think of?

You call it "browser-style". If it works like a normal web browser (only loads a per once per time that the user clicks on it), then it shouldn't be a problem, but why would such a program visit the site "in quick succession"?

It's really hard to give any concrete advice when you're this vague.

User avatar
Homyland
Spokesperson
 
Posts: 161
Founded: Apr 25, 2020
Scandinavian Liberal Paradise

Postby Homyland » Sat Dec 03, 2022 3:16 pm

Trotterdam wrote:
Kamchatska wrote:If your just browsing through the forums and looking through Factbooks without being logged in, then you a perfectly fine.
No you're not. The main purpose of the ratelimit (the main ratelimit, anyway, not the separate ratelimit for API telegrams) is to avoid putting excess load on the server, not to avoid giving some players an undue advantage, so it still applies when not logged in. The vast majority of NationStates scripts gather data that does not require being logged in to see.

Homyland wrote:So I'm working on a little browser-style program in Python, and to test if it works i just type up "nationstates.net" as the URL. I've only done this about 5 times right now. I am not logged in while doing this, however it's automatically going onto the site, sometimes in quick succession.
What is your program actually meant to do? Is its main purpose not actually related to NationStates and you're just randomly testing it on NationStates because that was the first site you could think of?

You call it "browser-style". If it works like a normal web browser (only loads a per once per time that the user clicks on it), then it shouldn't be a problem, but why would such a program visit the site "in quick succession"?

It's really hard to give any concrete advice when you're this vague.

Yeah, it's basically a browser, and yeah, this is the first site i can think of that doesn't sell my existence away the moment I click into it.

What I mean is sometimes i open it up, close it, make a quick change, and open it up again. Nothing close to what automatically opening it could do, but quicker than you'd normally close and open NS; which is what I'm worried about: something might detect I'm going onto the site quite rapidly, decide it's had enough and look at my computer, and go "oh, homyland is the guy behind all of this. let's yeet him."

I don't think it could happen, but i just wanna make sure I'm not testing on a site that could get me banned.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sat Dec 03, 2022 6:38 pm

Homyland wrote:Yeah, it's basically a browser, and yeah, this is the first site i can think of that doesn't sell my existence away the moment I click into it.
Wikipedia?

Homyland wrote:What I mean is sometimes i open it up, close it, make a quick change, and open it up again.
You mean like:
1. Open NationStates in your browser.
2. Notice that it's not working quite as desired because a bug in your browser.
3. Go into your code and fix it.
4. Restart your browser and open NationStates again in order to see if the fix worked.
?

I can't imagine that being a problem. Fixing code takes time, even for relatively small changes. It's not uncommon for manual users to open several pages a few seconds apart, such as when browsing through a World Census ranking list (10 nations at a time), heading to the World Assembly page and then immediately clicking onward to the resolution at vote, being in a nation's factbook list and deciding to open all the factbooks in separate tabs in rapid succession, etc. A burst of opening a few pages in rapid succession isn't a big deal so long as you then go a few minutes without doing anything else, which is usual browsing behavior for people.

There's no rule against accessing NationStates using exotic browsers, so long as their functionality falls within the general bounds of the kinds of things browsers normally do.

That said, you should consider making sure that your browser is setting a User-Agent correctly. Most mainstream browsers set a User-Agent so websites can tell which browsers its users are connecting with, although sometimes they allow disabling this for privacy reasons, so it's not strictly necessary. Although NationStates officially requires User-Agents to be set for all scripting access, the manual website does work without setting a User-Agent, but the admins will probably be happier if you set one, though you'd have to ask them how important it is. Especially when the browser is still experimental, a User-Agent would help the admins to contact you if there are any issues that need resolving (a properly-working browser isn't against the site rules, but it's conceivable that a bug in your browser could cause accidental violations). Of course, normally, a browser User-Agent wouldn't identify anything about your nation specifically, just say the name of the browser you're using.

User avatar
United Calanworie
Technical Moderator
 
Posts: 3763
Founded: Dec 12, 2018
Democratic Socialists

Postby United Calanworie » Sat Dec 03, 2022 11:23 pm

Okay so let me see if I've got this right.

You are building a web browser. In the course of building this browser, you are opening the url https://nationstates.net/ as a test case and rendering the content thereof onto your screen. You wish to know if you are violating the rules by doing so.

Assuming that I have the above correct, this is what I'd say. It is not, by default, illegal to access the page via a tool that is not a mainstream browser. Since you are visiting the site as a logged-out user, we do not need to worry about restricted actions being taken. Therefore, there are only really two things that you really need to consider here from the script rules.

- Set a User Agent
This is not optional. Please identify your tool. Preferably with contact information for you. The way I write my useragents that target the API is something along the lines of this: ToolName // vX.X.X // Developed by nation=united_calanworie // Email <user>@<provider>.<tld>

- Obey Rate Limits
If your tool makes **any** requests that are not a direct, 1:1 human input to action request, they must obey the limit of no more than ten requests per minute. Please do not exceed this limit, please try to stay south of it and not constantly bumping up against it.

If you can manage to abide by these very simple restrictions (which I am *confident* that you can), there should be no problems.
Trans rights are human rights.
||||||||||||||||||||
Discord: Aav#7546 @queerlyfe
She/Her/Hers
My telegrams are not for Moderation enquiries, those belong in a GHR. Feel free to reach out if you want to just chat.

User avatar
Homyland
Spokesperson
 
Posts: 161
Founded: Apr 25, 2020
Scandinavian Liberal Paradise

Postby Homyland » Sun Dec 04, 2022 2:17 am

Trotterdam wrote:
Homyland wrote:Yeah, it's basically a browser, and yeah, this is the first site i can think of that doesn't sell my existence away the moment I click into it.
Wikipedia?

Homyland wrote:What I mean is sometimes i open it up, close it, make a quick change, and open it up again.
You mean like:
1. Open NationStates in your browser.
2. Notice that it's not working quite as desired because a bug in your browser.
3. Go into your code and fix it.
4. Restart your browser and open NationStates again in order to see if the fix worked.
?

I can't imagine that being a problem. Fixing code takes time, even for relatively small changes. It's not uncommon for manual users to open several pages a few seconds apart, such as when browsing through a World Census ranking list (10 nations at a time), heading to the World Assembly page and then immediately clicking onward to the resolution at vote, being in a nation's factbook list and deciding to open all the factbooks in separate tabs in rapid succession, etc. A burst of opening a few pages in rapid succession isn't a big deal so long as you then go a few minutes without doing anything else, which is usual browsing behavior for people.

There's no rule against accessing NationStates using exotic browsers, so long as their functionality falls within the general bounds of the kinds of things browsers normally do.

That said, you should consider making sure that your browser is setting a User-Agent correctly. Most mainstream browsers set a User-Agent so websites can tell which browsers its users are connecting with, although sometimes they allow disabling this for privacy reasons, so it's not strictly necessary. Although NationStates officially requires User-Agents to be set for all scripting access, the manual website does work without setting a User-Agent, but the admins will probably be happier if you set one, though you'd have to ask them how important it is. Especially when the browser is still experimental, a User-Agent would help the admins to contact you if there are any issues that need resolving (a properly-working browser isn't against the site rules, but it's conceivable that a bug in your browser could cause accidental violations). Of course, normally, a browser User-Agent wouldn't identify anything about your nation specifically, just say the name of the browser you're using.

Yup, that's exactly what I mean.

As for the User-Agent it's already set by the script, as I'm not Chromium-ing my way into a completely independent browser.

It just reads your URL and puts it into whatever default browser you're using.
It's really simple, and that's the whole point of it to be fair.
United Calanworie wrote:Okay so let me see if I've got this right.

You are building a web browser. In the course of building this browser, you are opening the url https://nationstates.net/ as a test case and rendering the content thereof onto your screen. You wish to know if you are violating the rules by doing so.

Assuming that I have the above correct, this is what I'd say. It is not, by default, illegal to access the page via a tool that is not a mainstream browser. Since you are visiting the site as a logged-out user, we do not need to worry about restricted actions being taken. Therefore, there are only really two things that you really need to consider here from the script rules.

- Set a User Agent
This is not optional. Please identify your tool. Preferably with contact information for you. The way I write my useragents that target the API is something along the lines of this: ToolName // vX.X.X // Developed by nation=united_calanworie // Email <user>@<provider>.<tld>

- Obey Rate Limits
If your tool makes **any** requests that are not a direct, 1:1 human input to action request, they must obey the limit of no more than ten requests per minute. Please do not exceed this limit, please try to stay south of it and not constantly bumping up against it.

If you can manage to abide by these very simple restrictions (which I am *confident* that you can), there should be no problems.


The only thing that it does automatically is put the url into Firefox, Chrome, or whatever the user's set as default. It really doesn't interact with the API, and doesn't click automatically on any buttons.
And it doesn't log in automatically. The only way I can think of is if you had "remember me" on, and logs in as you enter the site.

Based on what everyone's saying I think I'm in the clear.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sun Dec 04, 2022 9:32 am

Homyland wrote:It just reads your URL and puts it into whatever default browser you're using.
...Why.

Why would you do this? What purpose does it serve that simply typing something into the URL bar doesn't?

User avatar
Homyland
Spokesperson
 
Posts: 161
Founded: Apr 25, 2020
Scandinavian Liberal Paradise

Postby Homyland » Thu Feb 02, 2023 10:07 am

Trotterdam wrote:
Homyland wrote:It just reads your URL and puts it into whatever default browser you're using.
...Why.

Why would you do this? What purpose does it serve that simply typing something into the URL bar doesn't?

I might be tiptoeing the gravedig line here but it's basically part of a bundle of little python programs i made so some computer illiterate relatives can use a computer (it also comes with like a little button that sends whatever you typed to Google search)


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Khantin, Kractero, Optimasia, Osmauri, Promo, Random Country 453632, Ratburger, Treir, Very totally free

Advertisement

Remove ads