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

BlackHatMon3yMaker

Registered Member
Joined
Feb 22, 2016
Messages
77
Reaction score
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>
 
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")
 
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"htt/ecx.images-amazoncom/images/*")>,"src"),"Delete","Global")

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?
 
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.
 
You should ask on the uBot forum. The forum is very active and you'll get answers much quick than asking here.
 
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:
Back
Top