Results 1 to 5 of 5

Thread: Python - Searching SDB for specific item.

  1. #1



    |2eap's Avatar
    Join Date
    Jun 2013
    Gender
    Location
    Underground
    Posts
    3,338
    Thanks
    2,261
    Thanked 2,449 Times in 1,304 Posts


    Downloads
    72
    Uploads
    0
    Mentioned
    801 Post(s)
    Time Online
    106 d 12 h 28 m
    Avg. Time Online
    1 h 52 m
    Rep Power
    10
    Gamer IDs

    Gamertag: D4NGL

    Python - Searching SDB for specific item.

    So i've been tinkering around for awhile with some code and I can't seem to figure it out.

    I've tried this


    And i've tried as a get



    I am successfully authorized on Neopets and logged in. It keep returning "Not finding any items matching your criteria" When it is in-fact in the SDB.

    Furthermore, I've tried c/p the url exactly when doing a get and i still get "Not finding any items matching your criteria".

    I've tested another users code using a different login method and mechanizing the browser and it seems to work following the paths/controllers.

    What am I missing?

    What is weird is, if I remove the check and just run the code straight through, it will remove the item IF it is in the SDB. if it is not in the SDB. it will still attempt to and say it has successfully done so even when it hasn't. The only time it prints error removing item is if there is a faulty pin.

    Thanks lads, contact me here or skype(preferably) if you got me.

  2. #2
    Black on Black

    Vegeta's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    114
    Thanks
    34
    Thanked 91 Times in 51 Posts


    Downloads
    22
    Uploads
    0
    Mentioned
    32 Post(s)
    Time Online
    5 d 22 h 48 m
    Avg. Time Online
    5 m
    Rep Power
    6
    Tum de dum
    Last edited by Vegeta; 3 Weeks Ago at 12:38 PM.

  3. #3
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,167
    Thanks
    709
    Thanked 1,342 Times in 626 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    484 Post(s)
    Time Online
    20 d 19 h 22 m
    Avg. Time Online
    18 m
    Rep Power
    13
    @|2eap
    You set the encodedItem variable but is not used in the rest of the code.
    Debug the values of pos1, pos2, pos3, html[pos2:pos3], and html (after the final acc.post call) , and the problem should become obvious

    Not sure what class you are using for web connections, but I know that some home-made solutions have problems with POSTing when a ? is in the URL.
    Last edited by Zachafer; 4 Weeks Ago at 01:34 PM.

  4. #4



    |2eap's Avatar
    Join Date
    Jun 2013
    Gender
    Location
    Underground
    Posts
    3,338
    Thanks
    2,261
    Thanked 2,449 Times in 1,304 Posts


    Downloads
    72
    Uploads
    0
    Mentioned
    801 Post(s)
    Time Online
    106 d 12 h 28 m
    Avg. Time Online
    1 h 52 m
    Rep Power
    10
    Gamer IDs

    Gamertag: D4NGL
    Quote Originally Posted by Zachafer View Post
    @|2eap
    You set the encodedItem variable but is not used in the rest of the code.
    Debug the values of pos1, pos2, pos3, html[pos2:pos3], and html (after the final acc.post call) , and the problem should become obvious

    Not sure what class you are using for web connections, but I know that some home-made solutions have problems with POSTing when a ? is in the URL.
    The variable encodedItem in the first code snippet was just there from trying as a get in example two. I should have taken it out or commented it out but it's not needed in the post request.


    And the second post request still removes the item from SDB. its the initial request for searching the specific item that returns the item is not in SDB. I've tried it as a get and post but it returns the same thing.

    This is where it's happening.

    url = "http://www.neopets.com/safetydeposit.phtml"
    postdata = {}
    postdata['obj_name'] = item
    postdata['category'] = 0
    html = acc.post(url, postdata)
    print html

    or

    encodedItem = item.lower().replace(" ", "+").strip()
    url = "http://www.neopets.com/safetydeposit.phtml?obj_name=" + encodedItem + "&category=0"

    html = acc.get(url)
    print html

    I'm logging in with a edited working variation of neoaccount.py. But basically the same build

  5. #5
    if: elif: else:




    Daviid's Avatar
    Join Date
    Jul 2012
    Gender
    Location
    Spain
    Posts
    1,514
    Thanks
    1,285
    Thanked 1,509 Times in 636 Posts


    Downloads
    202
    Uploads
    21
    Mentioned
    368 Post(s)
    Time Online
    69 d 4 h 55 m
    Avg. Time Online
    1 h 2 m
    Rep Power
    12
    From my kad feeder:

    @|2eap I can send you my SDB remover if you want. I think I updated it not long ago but forgot to upload here.

    Edit:
    The code it's copied&pasted from another program and I just noticed that if you want to remove the item "Mau Codestone" and you have 10 it'll remove all of them.
    Last edited by Daviid; 4 Weeks Ago at 03:57 PM.

  6. The Following User Says Thank You to Daviid For This Useful Post:

    |2eap (3 Weeks Ago)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •