A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[Python] Weird Errors

990 views · started by Bman ·
#1
[Python] Weird Errors
Riddle, your HTTP Class is fucked... Nuff said, It wont post data to Gaia
Im ready to Ragequit python...
#2
do

i = 1
while i <=8:
HTTP.GET("Link here"+str(i),"Postdatahere")
i++
#3
Already tried.

Also, The fucking Getstringbetween function is GAY.

It never returns anything >.>

if Gaia.Login(user,passw) !=False:
Gold_Start = "<span id=\"gold_amt\">"
Gold_End = "</span>"
Html = http.GET("http://www.gaiaonline.com")
Gold = (self.g.GetBetween(self,Html,Gold_Start,Gold_End))
print(Gold)


I tried to use the same thing from riddles Tektek Module, and it wont work...

Python hates me :(

Edit :

Now its constantly returning none.

Just 'None'

Ughh, I fucking hate this >.>
#4
Aren't you using Python 3.1 and not 2.6?
#5
Fixed it.

Thanks anyways guys :D
#6
Heh. Bman, I don't know what you did wrong... but next time post a script that re-creates the error you were winning about. :)
#7
Riddle wrote:
Heh. Bman, I don't know what you did wrong... but next time post a script that re-creates the error you were winning about. :)

That could have been phrased so much better.

Anyway, @OP, Could you post the getstringbetween function?
I want to see the python version. (That script has been passed around and ported since the original was posted [autoit])

I may also fix it, if i can understand it. (I don't know Python)[/autoit]
#8
    def GetBetween(self, content, start, end):
"""Returns '' on no match"""
r = content.split(start)
if len(r) > 1:
r = r[1].split(end)
return r[0]

return ''
[/0][/1]


It works. I use it all the time.
#9
Error fixed :P

The error was right infront of my face O:

I forgot to use a self.Namehere