Hack Forums
[.NET] Getting an image through element id - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Getting an image through element id (/showthread.php?tid=6144679)



Getting an image through element id - requiredhq - Mar 15, 2021

Call it a stupid fucking project because it is one.

I want to get an image from a website through it's id.

Within the id it has a src="Image I want"

As shown here,
Code
<img class="no-click screenshot-image" src="https://image.prntscr.com/image/pR1PH2hVScapzrYo1CWWEQ.png" crossorigin="anonymous" alt="Lightshot screenshot" id="screenshot-image" image-id="kjh7vf">

Code
Dim omg = "screenshot-image"
        label1.text = WebBrowser1.Document.GetElementById(omg).GetAttribute("scr")

I can't understand why it's pulling up nothing for the scr


RE: Getting an image through element id - requiredhq - Mar 15, 2021

(Mar 15, 2021 06:54 AM)Davkul Wrote:  I don't think this is the right section honestly, but anyhow, in the last part of the code you typed "scr" instead of "src", perhaps that is your issue.

Dude wow, your right. Thanks. Guess coding while tired can do that
It's a visual basic vids, anyway, problem solved! I continue the adventure


RE: Getting an image through element id - The - Mar 15, 2021

(Mar 15, 2021 06:54 AM)Davkul Wrote:  I don't think this is the right section honestly, but anyhow, in the last part of the code you typed "scr" instead of "src", perhaps that is your issue.

Dim omg = "screenshot-image"

That looks like Visual Basic to me.