1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help on uBot code? Pretty sure fix is simple, can't figure it out though

Discussion in 'General Programming Chat' started by BlackHatMon3yMaker, Mar 28, 2016.

  1. BlackHatMon3yMaker

    BlackHatMon3yMaker Registered Member

    Joined:
    Feb 22, 2016
    Messages:
    75
    Likes Received:
    13
    Basically I'm trying to download a picture from an element.
    I try to extract it using the 'innerhtml' attribute but it always pulls the height,width,etc. behind it.
    Whats the best way to tell the code to extract only the bolded into a variable? So that it works universally as well?
    That way after that, I can tell it to download from the variable

    I keep trying
    Code:
    <innerhtml=w"img src=\"httpecx.images-amazoncom/images/I/*.jpg\" ">
    but to no avail. I guess I don't understand why that wouldn't work.

    Thanks in advance for any input.

    Code:
    <div id="ivLargeImage" style="height: 401px; display: block; opacity: 1; visibility: visible; cursor: zoom-in;">
    <img src="[B]httpecx.images-amazoncom/images/I/61kABvWK2WL._SL1200_jpg[/B]" class="fullscreen" style="margin-top: 130.315px; margin-left: 0px; height: 140.37px; width: 237px;"></div>
     
  2. AquaticGamer

    AquaticGamer Jr. VIP Jr. VIP

    Joined:
    Apr 13, 2013
    Messages:
    4,799
    Likes Received:
    1,701
    Gender:
    Male
    Location:
    http://InstaGrowth.AQSocials.com
    Home Page:
    Have you tried contacting their support on this issue? I think their the best people to help you out on this.
     
    • Thanks Thanks x 2
  3. delite737

    delite737 Registered Member

    Joined:
    Nov 1, 2013
    Messages:
    70
    Likes Received:
    11
    hey

    This should work,just quickly tested and gave me 136 jpg src's

    add list to list(%imgLinks,$scrape attribute(<(tagname="img" AND src=w"http://ecx.images-amazon.com/images/*")>,"src"),"Delete","Global")
     
    • Thanks Thanks x 1
  4. BlackHatMon3yMaker

    BlackHatMon3yMaker Registered Member

    Joined:
    Feb 22, 2016
    Messages:
    75
    Likes Received:
    13
    Hey thanks man that helps a lot! I figured out all the images I need/want have "._SL1500_jpg" in the link. I tried to do this:
    add list to list(%imgLinks,$scrape attribute(<(tagname="img" AND src=w"htt//ecx.images-amazoncom/images/*._SL1500_jpg")>,"src"),"Delete","Global")

    But it didn't work. Any way to extract only the links with this text in it?
     
  5. trance92071

    trance92071 Senior Member

    Joined:
    Nov 1, 2009
    Messages:
    950
    Likes Received:
    849
    Occupation:
    Internet Marketing
    Location:
    BoosterBots.com
    Home Page:
    If you know how to use regex I would suggest doing that instead. The scrape attribute command is useful for somethings but not all. If you need some direct assistance PM me and I can add you on skype to walk you through what you need.
     
    • Thanks Thanks x 1
  6. BlackHatMon3yMaker

    BlackHatMon3yMaker Registered Member

    Joined:
    Feb 22, 2016
    Messages:
    75
    Likes Received:
    13
    ^^PM Sent!!!!!!!
     
  7. dp40oz

    dp40oz Jr. VIP Jr. VIP Premium Member

    Joined:
    May 13, 2009
    Messages:
    725
    Likes Received:
    211
    Home Page:
    You should ask on the uBot forum. The forum is very active and you'll get answers much quick than asking here.
     
  8. delite737

    delite737 Registered Member

    Joined:
    Nov 1, 2013
    Messages:
    70
    Likes Received:
    11
    load html("
    <img src=\"httpecx.images-amazoncom/images/I/61kABvWK2WL._SL1500_jpg\"/>
    <img src=\"httpecx.images-amazoncom/images/I/61kABvWK2WL._SL1200_jpg\"/>")
    add list to list(%imgSRC,$scrape attribute(<(tagname="img" AND src=r"SL1500_jpg")>,"src"),"Delete","Global")

    Hey,so I tried this on the amazon site and got zero matches,so I added some HTML above to show that it does actually work,the "r" means a regular expression,so any img tag that has an src that contains SL1500_jpg will be matched
     
    Last edited: Mar 29, 2016