Forums

Requesting white listed website

Hello, I am requesting the host chatango.com whitelisted, I'm not too sure if this would be allowed but I am using it to run a text based chatroom bot, it would be greatly appreciated if this could be done. Letting the domain whitelisted would also help me alot during schooling, (Australian ISP's are very strict with what they whitelist, lucky enough pythonanywhere isn't on the blacklist.)

Thank-you for considering this and anything in advance.

Why not simply run a chatroom server on your pythonanywhere account. I'm sure there are some Django based ones you could basically cut-and-paste.

You would then be able to ask your friends to go to d3c1v3r.pythonanywhere.com

Just a thought

Some services object to automated participants like bots, but I can't see anything specifically in the Chatango terms of use which forbids them. They do specifically forbid spam (unsurprisingly) so my concern would be whether PA could be abused to spam chat rooms. Not that I'm suggesting you're intending to do that, @d3c1v3r, but I guess it's something that the PA staff have to consider before adding it to the whitelist, since the same whitelist applies to all future users as well.

@d3c1v3r, I have been looking at chatango and I have 2 concerns about whitelisting it:

  1. As Cartroo pointed out, spam could be a problem. No necessarily by you, but possibly by someone that come along later.
  2. Is a technical concern. If chatango don't use http(s) for their chats (unlikely, but possible) then adding them to the whitelist may be pointless because our proxy only believes in http(s) and, in some cases, https doesn't work so well anyway.

@rcs1000 The Program which I am making is when a user types a certain command, the bot will respond to it, It also has a minor anti-spam feature inbuilt to clean up the chatroom but Chatango also has a anti-spam feature. I also can't exactly make 70-140 people move to a different location..

@glenn Chatango has an inbuilt anti-spam feature which is very well built, I'm not too sure about the http(s), but the bot is just text/console based, seeing that the bot reacts to commands only, it's very hard to spam the bot without getting yourself banned for spamming via chatango. I'm not too sure on what the security on chatango.com is, but I do believe it has http, they do have a HTML5 chat, so hopefully, they can keep their standards up

Another issue which I have noticed in my program is my bot uses (http://thesurrealist.co.uk) as a dictionary, just for fun. It gathers text from the website and prints it. If I could request this to be whitelisted aswell that would be awesome. (This isn't 100% needed, but would be nice.)

I have added chatango.com to the whitelist, but not thesurrealist.co.uk (no API, no general usefulness). Let me know how it goes.

You could easily just gather a static version of the dictionary and upload it - that would be considerably faster than scraping it from another website every time anyway.

@glenn I am still having problems connecting, the server/port the bot uses is

_PMHost = "c1.chatango.com" _PMPort = 5222

@Cartoo, That's a bit difficult (for me) and I wouldn't have any idea how to do that, including the file would be massive, because the dictionary is infinite (http://thesurrealist.co.uk/slang.cgi?ref=)

I don't think you can access arbitrary ports: I think you're restricted to 80/443. (To stop people using PA to host spam servers to launch DDOSs)

You won't be able to connect on port 5222 - free accounts can only use HTTP and HTTPS (i.e. ports 80 and 443). That's why Glenn specifically said:

If chatango don't use http(s) for their chats (unlikely, but possible) then adding them to the whitelist may be pointless because our proxy only believes in http(s) [...]

Re: the dictionary, I was referring to the source which is linked at the bottom of the page, which appears to have the full dictionary available (admittedly you'd need to do some text processing to extract it from HTML to plaintext).

Alternatively you could just try every combination from 1-8 letters - that's only 217 billion or so, if you can do 10 a second then it'd only take around 688 years or so... (^_^)

@rcs1000: The possibilities for abuse are many and varied - I think the principle is that people who've paid some money can have an account which can be cancelled in case of abuse, but free accounts can, in principle, be created in an automated fashion to escape any blocks or bans.

@Cartroo -- 100% correct as always ;-)

@d3c1v3r -- the problem is that accessing something on port 5222 is not HTTP or HTTPS -- I suspect it's XMPP/Jabber or a related chat protocol. Free accounts on PythonAnywhere can only access outside sites over HTTP or HTTPS.

@Cartroo: What CPU are you using that can only process something @ 10/second?....j/k

@a2j: When you're doing repeated HTTP fetches from a remote server the CPU is the least of your worries. Actually supporting 10 requests a second might be optimistic as that site appears to use a CGI for its page generation, so I bet it's not particularly optimised.

I think you missed my j/k

first, sorry for the one month bump but i feel like i need to add this:

@d3c1v3r:

you are new to the chatango bot thing aren't you...

you do know that you don't really have to connect to the PM server to connect the bot to the room right?

@giles & d3c1v3r:

let skip the connecting to the PM server which use (like d3c1v3r said) 5222 and connect to only the room server which use 443

but the same error happen, ConnectionRefusedError: [Errno 111] Connection refused, this time it use:

socket.socket().connect(("s45.chatango.com",443))

so, what else can it be wrong?

Note: it don't always use s45, it sometimes use s01 - s99 but mostly just s42,s43,s44,s45 base on the server the room is in.

@d3c1v3r: base on this link, http://thesurrealist.co.uk/slang.cgi?ref=, i am guessing you are using thesurrealist for slangs,

i been making my own slang list too, it got (so far) 5410 slangs, PM me at chatango, asl97, if you want the list i got.

Free accounts can only access the internet via a proxy server. Trying to make a raw socket connection to another host just won't work unless you upgrade to a paid account.

You'll have to rewrite your script to pull the proxy server setting out of the relevant environment variable and connect to the internet via that.

That means that a chatango bot can be hosted via this website, if we buy a "Hacker" membership for 5 dollars a month? Or is there a possiblity that it will still not work, even if we do buy a payed membership? I'm asking this because I'm considering it, but I want to be sure if it works before I pay money for it.

@hansel:

instead of pull, can't i just rewrite it to use the proxy server?

and to use the proxy server, we would need to know what the server is don't we?

if that is so, can you tell us the info we need to make it work with the proxy server?

eg: the link to the server and the port and whatever else we might need.

@asl97: What Hansel was saying is that the proxy server details are already available as an environment variable on PA. You should write your script to use this environment variable (as opposed to hard-coding it) because the settings may change in the future and you wouldn't want to have to go and re-write your script.

Since I don't have a free account, the relevant setting is no longer configured in my environment so I can't check but I believe it's something like HTTP_PROXY or PROXY_DOMAIN. If you open a bash console and run something like:

set | grep -i proxy

... then you should find it. It should contain a hostname and port separated by a colon which you can use. But seriously, don't hard-code it, you'll be making unnecessary hassle for yourself. You can access environment variables in Python trivially using os.environ.

Hello again,

Yes indeed. For free accounts we set the http_proxy environment variable. This means that most Python programs just use the proxy transparently without you having to worry about it. Have a look at the proxy section in the documentation for Urllib2: http://docs.python.org/2/library/urllib.html.

Upgrading your account to get unrestricted internet access would also most likely work. We offer a no quibble refund policy, so you have nothing to lose by trying it out.