Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Neolib

  1. #11

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    I'l update the original post again

    Just a warning to anyone currently using or thinking about using the project, I will be moving to Python 3 with the next release. In fact, the next revision is going to change a lot of the HTTP core. My current intentions are to move the current master branch to a new branch to maintain the Python 2 compatibility, and then update the master branch to the Python 3 version. I also did revision of the configuration system, which I talked about (you need an account to see links).

  2. The Following 2 Users Say Thank You to AliasXNeo For This Useful Post:

    DarkByte (10-04-2012),j03 (10-04-2012)

  3. #12
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by ikakk View Post
    Quote Originally Posted by AliasXNeo View Post
    I'l update the original post again

    Just a warning to anyone currently using or thinking about using the project, I will be moving to Python 3 with the next release. In fact, the next revision is going to change a lot of the HTTP core. My current intentions are to move the current master branch to a new branch to maintain the Python 2 compatibility, and then update the master branch to the Python 3 version. I also did revision of the configuration system, which I talked about (you need an account to see links).
    Welcome to our site you two

  4. #13

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    Quote Originally Posted by Zachafer View Post
    Welcome to our site you two
    Thanks.

    The master branch now reflects the Python 3 changes. The latest stable for Python 2 is now on branch 'py27'. I havn't tested the latest commit with Windows yet (developing on CrunchBang Linux), however I'll do so tonight and update with any hot fixes.

  5. #14

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    Since the some of the old thread content was lost, here's some more showing off This is the very basic main loop I have for the UAB I am developing. Searches for an item, buys it if it's cheap enough, then stocks and prices it and repeats.

    Code:
    def mainLoop(self):
            
            while True:
                for item in self.items:
                    cmpPrice = item.price - self.dedAmount
                    
                    r = ShopWizard.search(self.usr, item.name)
                    
                    if (int(r[0].price) < cmpPrice):
                        if r.buy(0):
                            print ("Bought " + item.name + " at " + str(item.price))
                            
                            self.usr.inventory.load()
                            if not item.name in usr.inventory:
                                print("Error handling item: " + item.name)
                                continue
                            
                            self.usr.inventory[item.name].stock()
                            self.usr.shop.load()
                            self.usr.shop.inventory[item.name].price = ShopWizard.price(self.usr, item.name, method=ShopWizard.AVERAGE)
                            self.usr.shop.update()
                            
                            print("Handled " + item.name + " successfully")
                        else:
                            print ("Missed " + item.name)
    That being said, I am having trouble finding a python 3.x imaging library that plays well with the main shop captcha. If anyone is interested in really helping this library out, a main shop OCR module would be extremely helpful
    Last edited by AliasXNeo; 10-08-2012 at 01:01 AM.

  6. #15

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    Turns out the current release of Neolib is completely backwards compatible with Python 2.x. That being said, I'm going to go ahead and officially move back to Python 2.x and transfer the current master branch to 'py3k'.

    I've started work on the OCR crack with the Python Imaging Library, however due to real life issues I've had little time to improve the accuracy. Anyone interested in helping me pick up the slack let me know. Cheers.

    ---------- Post added at 11:36 PM ---------- Previous post was at 11:36 PM ----------

    Turns out the current release of Neolib is completely backwards compatible with Python 2.x. That being said, I'm going to go ahead and officially move back to Python 2.x and transfer the current master branch to 'py3k'.

    I've started work on the OCR crack with the Python Imaging Library, however due to real life issues I've had little time to improve the accuracy. Anyone interested in helping me pick up the slack let me know. Cheers.

  7. #16
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by AliasXNeo View Post
    Turns out the current release of Neolib is completely backwards compatible with Python 2.x. That being said, I'm going to go ahead and officially move back to Python 2.x and transfer the current master branch to 'py3k'.

    I've started work on the OCR crack with the Python Imaging Library, however due to real life issues I've had little time to improve the accuracy. Anyone interested in helping me pick up the slack let me know. Cheers.

    ---------- Post added at 11:36 PM ---------- Previous post was at 11:36 PM ----------

    Turns out the current release of Neolib is completely backwards compatible with Python 2.x. That being said, I'm going to go ahead and officially move back to Python 2.x and transfer the current master branch to 'py3k'.

    I've started work on the OCR crack with the Python Imaging Library, however due to real life issues I've had little time to improve the accuracy. Anyone interested in helping me pick up the slack let me know. Cheers.
    Have you posted the OCR code? I'd like to see it

  8. #17

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    Well here's a start:

    Code:
    im = Image.open("capt.jpg")
    im = im.convert("L")
    l, h = im.getextrema()
    p = im.point(lambda x: x == l)
    x, y, _, _ = p.getbbox()
    That usually gets you right on the border of the pet, so it's a starting place (but Neopets usually doesn't like the cords). Just need to grab 3 more points and use it as a virtual box and just aim for the middle.

    ---------- Post added at 09:57 AM ---------- Previous post was at 09:57 AM ----------

    Well here's a start:

    Code:
    im = Image.open("capt.jpg")
    im = im.convert("L")
    l, h = im.getextrema()
    p = im.point(lambda x: x == l)
    x, y, _, _ = p.getbbox()
    That usually gets you right on the border of the pet, so it's a starting place (but Neopets usually doesn't like the cords). Just need to grab 3 more points and use it as a virtual box and just aim for the middle.

  9. #18

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    All un-revisioned or incomplete changes are being committed to the 'dev' branch. If you're wanting to use the bleeding-edge of this library, please checkout that branch rather than the master branch. The master branch will be updated with the dev branch once all goals of a revision have been met. The latest commit includes the above OCR code.

  10. The Following User Says Thank You to AliasXNeo For This Useful Post:

    Zachafer (10-23-2012)

  11. #19

    Joined
    Sep 2012
    Posts
    39
    Userbars
    0
    Thanks
    0
    Thanked
    31/15
    Mentioned
    11 times
    Time Online
    2d 8h 38m
    Avg. Time Online
    N/A
    Major update today to V1.0.0. This is the first major public release of Neolib. A PyPi package has been created to allow for installation with easy_install:

    Code:
    easy_install neolib
    A more in-depth README can also be found on the Github page.[COLOR="Silver"]
    Last edited by AliasXNeo; 10-30-2012 at 07:49 PM.

  12. The Following 2 Users Say Thank You to AliasXNeo For This Useful Post:

    j03 (10-30-2012),runbikesurf (10-30-2012)

  13. #20
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,745
    Userbars
    176
    Thanks
    5,932
    Thanked
    33,163/6,620
    DL/UL
    23/36
    Mentioned
    3,871 times
    Time Online
    564d 3h 51m
    Avg. Time Online
    3h 13m
    Quote Originally Posted by AliasXNeo View Post
    Major update today to V1.0.0. This is the first major public release of Neolib. A PyPi package has been created to allow for installation with easy_install:

    Code:
    easy_install neolib
    A more in-depth README can also be found on the Github page.

    ---------- Post added at 12:20 PM ---------- Previous post was at 12:20 PM ----------

    Major update today to V1.0.0. This is the first major public release of Neolib. A PyPi package has been created to allow for installation with easy_install:

    Code:
    easy_install neolib
    A more in-depth README can also be found on the Github page.
    This is brilliant!

    Edit: How come you are continuously double posting now? Guessing you are on some mobile device?
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


Posting Permissions

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