Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [VB6] Grabbing Neopet Shop Item obj_id Value

  1. #1
    Vinko's Avatar
    Join Date
    Mar 2012
    Gender
    Location
    Fort Campbell, Kentucky
    Age
    30
    Posts
    204
    Thanks
    52
    Thanked 83 Times in 40 Posts


    Downloads
    32
    Uploads
    3
    Mentioned
    32 Post(s)
    Time Online
    1 d 24 m
    Avg. Time Online
    N/A
    Rep Power
    7

    [VB6] Grabbing Neopet Shop Item obj_id Value

    Can someone please point out the mistake i am making,
    I am trying to make strVal = 7465
    i have worked on it different ways for like the past 2 hrs and can't figure it out.
    Please someone make me feel dumb and show me thhe error of my ways.



    Dim strHTML as String, strVal as String


    strHTML = w.Request("GET", "http://www.neopets.com/market.phtml?type=your")
    strVal= GetStringBetween(strHTML, "<b>Special</b>", "<input type")
    strVal= GetStringBetween(strVal, "value='", "'><input type"


    Spoiler taken straight from the source code of the page, when i view it in firefox.

  2. #2

    Join Date
    Feb 2012
    Gender
    Posts
    223
    Thanks
    72
    Thanked 44 Times in 13 Posts


    Downloads
    60
    Uploads
    2
    Mentioned
    27 Post(s)
    Time Online
    1 d 8 h 31 m
    Avg. Time Online
    1 m
    Rep Power
    6
    This would just be my guess, but possibly make another variable for StrVal
    I.E.
    Dim StrVal1 as String
    strVal= GetStringBetween(strVal1, "value='", "'><input type"
    Also maybe you need a referral in strHTML = w.Request("GET", "http://www.neopets.com/market.phtml?type=your" ?

    That's just my guess though

  3. #3
    Saiyan Race





    Infamous Joe's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    Hyperbolic Time Chamber
    Age
    26
    Posts
    9,754
    Thanks
    2,780
    Thanked 16,239 Times in 4,238 Posts


    Downloads
    23
    Uploads
    36
    Mentioned
    2985 Post(s)
    Time Online
    293 d 17 h 16 m
    Avg. Time Online
    3 h 44 m
    Rep Power
    10
    Gamer IDs

    Gamertag: Infam0us Joe Steam ID: infamousjoe
    ^More efficient to just store in strVal first then grab from strVal again and assign final value.

  4. #4
    Vinko's Avatar
    Join Date
    Mar 2012
    Gender
    Location
    Fort Campbell, Kentucky
    Age
    30
    Posts
    204
    Thanks
    52
    Thanked 83 Times in 40 Posts


    Downloads
    32
    Uploads
    3
    Mentioned
    32 Post(s)
    Time Online
    1 d 24 m
    Avg. Time Online
    N/A
    Rep Power
    7
    Quote Originally Posted by jojo View Post
    This would just be my guess, but possibly make another variable for StrVal
    I.E.
    Dim StrVal1 as String
    strVal= GetStringBetween(strVal1, "value='", "'><input type"
    Also maybe you need a referral in strHTML = w.Request("GET", "http://www.neopets.com/market.phtml?type=your" ?

    That's just my guess though
    I was thinking the same thing but even when i took the last step out strVal returned nothing

    both label1 and list1 come back with nothing.

    then when i did

    it tells me no everytime.


    its like strHTML is not grabbing the full source code.

    @Infamous Joe
    Last edited by Vinko; 04-26-2012 at 12:23 AM.

  5. #5
    Banned
    Join Date
    Dec 2011
    Gender
    Location
    Kiwiland
    Posts
    264
    Thanks
    22
    Thanked 106 Times in 68 Posts


    Downloads
    22
    Uploads
    0
    Mentioned
    74 Post(s)
    Time Online
    N/A
    Avg. Time Online
    N/A
    Rep Power
    0
    Does the wrapper use "" or '' for its HTML? I'd try debug every step to see where it is going wrong to start with.

  6. #6
    Vinko's Avatar
    Join Date
    Mar 2012
    Gender
    Location
    Fort Campbell, Kentucky
    Age
    30
    Posts
    204
    Thanks
    52
    Thanked 83 Times in 40 Posts


    Downloads
    32
    Uploads
    3
    Mentioned
    32 Post(s)
    Time Online
    1 d 24 m
    Avg. Time Online
    N/A
    Rep Power
    7
    Quote Originally Posted by Josh View Post
    Does the wrapper use "" or '' for its HTML? I'd try debug every step to see where it is going wrong to start with.
    not sure josh, it is the ripperwrapper that i got off this site.

    EDIT: Oh josh it uses " around the http and anytime there is one in the strand i have to put another one.

    really new to all this, basically i want it to price thee items in my shop

    using the value in my text box..

    it works using this




    but that is because in the coding i have the value actually typed in, it is for one of the codestones.
    not everytime will the item be this codestone so i am trying to grab the value so i can make it a variable.
    Last edited by Vinko; 04-26-2012 at 12:30 AM.

  7. #7
    Banned
    Join Date
    Dec 2011
    Gender
    Location
    Kiwiland
    Posts
    264
    Thanks
    22
    Thanked 106 Times in 68 Posts


    Downloads
    22
    Uploads
    0
    Mentioned
    74 Post(s)
    Time Online
    N/A
    Avg. Time Online
    N/A
    Rep Power
    0


    See if the msgbox fills with what is meant to be grabbed.

  8. #8
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Quote Originally Posted by Vinko View Post
    Can someone please point out the mistake i am making,
    I am trying to make strVal = 7465
    i have worked on it different ways for like the past 2 hrs and can't figure it out.
    Please someone make me feel dumb and show me thhe error of my ways.



    Dim strHTML as String, strVal as String


    strHTML = w.Request("GET", "http://www.neopets.com/market.phtml?type=your")
    strVal= GetStringBetween(strHTML, "<b>Special</b>", "<input type")
    strVal= GetStringBetween(strVal, "value='", "'><input type"


    Spoiler taken straight from the source code of the page, when i view it in firefox.
    I'm disappointed with the responses thus far. Do you guys even put thought into these responses?

    is the problematic line.

    Look at the HTML you posted:
    that getbetween returns "</td>"

    Try this:


    This is a perfect time to use Regex

  9. #9
    Vinko's Avatar
    Join Date
    Mar 2012
    Gender
    Location
    Fort Campbell, Kentucky
    Age
    30
    Posts
    204
    Thanks
    52
    Thanked 83 Times in 40 Posts


    Downloads
    32
    Uploads
    3
    Mentioned
    32 Post(s)
    Time Online
    1 d 24 m
    Avg. Time Online
    N/A
    Rep Power
    7
    @zach

    I tried the above method and it didn't work
    so I used the feature you showed me with Ctrl+G
    and made it to where strHTML showed in that,
    it doesn't appear to be all the source code from the page.

  10. #10
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Quote Originally Posted by Vinko View Post
    @zach

    I tried the above method and it didn't work
    so I used the feature you showed me with Ctrl+G
    and made it to where strHTML showed in that,
    it doesn't appear to be all the source code from the page.
    Probably one of two things:
    - Immediate Window / CTRL+G (Debug.print) only displays so many characters
    - Wrapper doesn't like running in IDE mode

    Try:
    - Turning off GZIP in the Wrapper (should be a boolean Property in the Properties Window)
    - Compiling your program to a .exe and then writing the HTML contents to a file (Open , Input , Close)

Page 1 of 2 12 LastLast

Posting Permissions

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