« first day (2597 days earlier)      last day (2639 days later) » 

12:27
!!exit
 
8 hours later…
Zoe
Zoe
19:57
//help
#################### Commands ####################
--------------------------------------------------
help    |    Lists all the commands the bot has
shrug    |    Shrugs
Zoe
Zoe
ausgezeichnet
20:14
!!exit()
Zoe
Zoe
//help
#################### Commands ####################
--------------------------------------------------
help    |    Lists all the commands the bot has
shrug    |    Shrugs
summon    |    Summon the bot to a room
@Zoe You have to specify a room...
Zoe
Zoe
//summon 69460
@Zoe Maybe you should consider looking up the manual
Zoe
Zoe
//summon 69460
20:19
@Zoe Maybe you should consider looking up the manual
20:46
!!exit
!!exit
Zoe
Zoe
//summon 69460
@Zoe 2 more votes required
Zoe
Zoe
ffs
!!img/CaCO3
Zoe
Zoe
wonders when @Mr.Xcoder and @Hippalectryon will notice there is no active bot with the !! trigger
20:51
@Zoe There's my bot
But I'm tryint to fix it after SE messed it up by channging idk what in their login code
Zoe
Zoe
They haven't changed anything recently
1
Q: Cookie selectively not send with Requests

HippalectryonUsing the requests module with Python 3.6 (also happens with 3.5), here's the essence of my code: sess=requests.Session() login_to_stackexchange(sess) # logs in to SE print(sess.cookies) # see below sess.post("chat.stackexchange.com/something",data=data) # data={"index":stuff} The cookies at l...

It used to work êrfectly fine
and now for some reason it doesn't
:c
Zoe
Zoe
That's more likely a python update issue than an SE one
I haven't updated my my python though
Zoe
Zoe
Any libraries?
20:54
libs don't autoupdate afaik
Zoe
Zoe
You could still have updated them, doesn't pip have a bulk update feature?
I mean, I haven't touched to my python and libs at all between the time when it went from working to non working
!!exit
Zoe
Zoe
My bot doesn't use cookies, it parses HTML to find the fkey. Could be an idea looking into that if you can't get cookies to work
@Zoe How does it post messages ?
Zoe
Zoe
Websocket URLs
20:58
Oh, you can post messages via the websocket ? :o
What's the url ?
I do it via POST requests atm
Zoe
Zoe
It sends a POST request to a url with the fkey and text
I only use the websocket to listen to messages
Zoe
Zoe
Gotta go grab them, one sec
It's not the one in my SE question, is it ? (see the comments)
Zoe
Zoe
I got a bunch of URL's for a lot of events:
21:03
which are ?
Zoe
Zoe
chatURL + "/messages/" + messageID + "/delete" | delete messages
chatUrl + "/chats/" + room + "/messages/new" | new message
chatDomain + "/user/info" | user info
chatDomain + "/rooms/pingable/" + roomID | get pingable users in a room
chatDomain + "/rooms/thumbs/" + roomID | get room info
chatDomain + "/chats/leave/" + roomID | Leave a room
chatDomain + "/rooms/" + roomID | The room itself
chatDomain + "/ws-auth" | Websocket authentication (apparently didn't use this one anywhere xD)
Then there's the login:
That's very weird, it's the same URL as mine :(
Zoe
Zoe
SO/MSE: domain + "/users/login"
SE: domain + "/users/signin"
There's more to the SE login though than just that URL
Well since I'm connected to the WS, it means the login was successful I guess
Zoe
Zoe
The login URL is to grab the fkey, then a POST request is made to https://openid.stackexchange.com/affiliate/form/login/submit with email, password, fkey and affId (11)
then after that there's even more because there's a variable called "target" hidden in the page JS
(if it doesn't redirect automatically. Mine didn't so I have to do it manually)
Got a regex for it:
(var target = .*?;)
21:07
You do need the cookies to post messages, though your libraries probably automatically handles that
Zoe
Zoe
It uses the fkey
Also thanks but for the login I have working code :-) the issue is just with messages
Zoe
Zoe
For an instance sending a message:
Http.Response response = parent.getHttp().post(parent.getUrl() + "/chats/" + id + "/messages/new",
            "text", message,
            "fkey", fkey
    );
The fkey is essentially the cookie though, as long as its passed you can do whatever you want
I'm doing the same thing. That's why idk why it doesn't work, why it doesn't send the acc cookie
Nah the fkey alone isn't enough
I've tried
Your library just automatically handles cookies
And so should mine, but for some reason it doesn't do it well
!!exit
Zoe
Zoe
Don't know what library you use, is there a chance the cookies are stored somewhere and reloaded with invalid data later?
21:11
The main issue is the following: in the cookie jar there are two cookies with the same rule but only one get sent and not the other (cf my SE question, there's the actual cookies)
And I can't begin to understand why
!!exit
test
Zoe
Zoe
Was that an actual message or was it a manual test?
:O
:OOOO
Why the hell did it work
!!test
!!test/a
!!exit
test
!!img/h2o
!!exit
Zoe
Zoe
21:19
so it has an active connection, it can send messages
Zoe
Zoe
oh
right
Well yeah I'm mpdifying the code
Zoe
Zoe
If you send the same message twice it gets merged
I litterally added cookies=the_cookies and it worked ._.
but now there's a new error
Zoe
Zoe
21:20
add like a random number at the end if you want to keep testing it
test
!!test
:(
Zoe
Zoe
you can try reproducing what I just mentioned, write something like test twice in a row
if it's the same message twice in a short period of time, the old will merge with the new
essentially, the new message disappears
same applies to the bot, you have to make sure you add a value after there that makes it unique every time if you just send test messages
!!test
I know, the issue is that there's a silly python error when launching a command
the bot says "test" each time I launch it up
Zoe
Zoe
//summon 69460
21:24
@Zoe As you command, I'll leave for that room as soon as possible
Zoe
Zoe
up in four commands in my bot
test
!!test
!!exit
test1
21:28
!!exit
test1
test1
test1
21:35
!!exit
!!exit
!!exit()
test1
test - success !
:DDDDDDDDDDDDDDDDDDDDDDDDD
:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
!!img/propanol
<An error occured : name 'clientImg' is not defined. Check your molecule's name>
21:42
:c yeah that's normal
!!exit
:DD
Zoe
Zoe
It works?
test - success !
!!img/propanol
Zoe
Zoe
21:45
Nice ^^
@cairdcoinheringaahing updated github
You only need to change chatbot.py
ー═┻┳︻▄ξ(✿ ❛‿❛)ξ▄︻┻┳═一
!!img/butan
21:50
!!molec_img propan
!!bidongfdfg
!!exit
!!flip
༼ ᕤ ºل͟º ༽ᕤ ︵┻━┻
!!test
test - success !
!!flip
༼ノຈل͜ຈ༽ノ︵┻━┻
21:52
!!help
Hi! I'm the almighty bot of ChemistrySE's main chatroom. /!\ If you find me annoying, you can ignore me by clicking on my profile image and chosing "ignore this user" /!\ You can find my documentation here.
!!greet
!!greet/me
!!greet/Ramanewbie
!!greet/chemobot
doesn't exist anymore
Was cool though
!!beer
21:54
!!untable
!!xkcd/500
!!wiki/banana
The banana is an edible fruit – botanically a berry – produced by several kinds of large herbaceous flowering plants in the genus Musa. In some countries, bananas used for cooking may be called plantains, in contrast to dessert bananas. The fruit is variable in size, color, and firmness, but is usually elongated and curved, with soft flesh rich in starch covered with a rind, which may be green, yellow, red, purple, or brown when ripe. The fruits grow in clusters hanging from the top of the plant. Almost all modern edible parthenocarpic (seedless) bananas come from two wild species – Musa acuminata...
!!scholar/benzene ring
Zoe
Zoe
!!help
Hi! I'm the almighty bot of ChemistrySE's main chatroom. /!\ If you find me annoying, you can ignore me by clicking on my profile image and chosing "ignore this user" /!\ You can find my documentation here.
Not all the commands have been re-implemented
21:59
!!img/glycerol
!!img/glycerol !!search/glycerol
<An error occured : cannot identify image file '1/temp/mol.gif'. Check your molecule's name>
@hippa ^
of course
you asked for "glycerol !!search/glycerol"
22:00
Is online multiple commands allowed ?
No mult commands, no need
22:15
@Hippalectryon Nice! What was the error?
@cairdcoinheringaahing An error in the library, it would seem :(
I did some ugly fix
22:30
@Hippalectryon Well, whatever works
22:43
@cairdcoinheringaahing Tell me if you encounter any pb with JHTbot :-)
23:02
@Hippalectryon Will do, thanks for all the help you've been!

« first day (2597 days earlier)      last day (2639 days later) »