Jump to content

TheLordofTheIoThings

Member
  • Posts

    3
  • Joined

  • Last visited

Awards

This user doesn't have any awards

System

  • CPU
    AMD Ryzen 7 3700X
  • Motherboard
    N/A
  • RAM
    16GB 3200MHz DDR4
  • GPU
    AMD RX 580
  • Case
    Corsair Air 540
  • Storage
    256GB Samsung 960 EVO M.2 SSD, Crucial MX500 500GB SSD
  • PSU
    Corsair CX750M
  • Display(s)
    1080 ASUS VS229 Monitor
  • Keyboard
    HyperX FPS RGB Cherry MX Blue
  • Mouse
    Hyperx Pulsefire
  • Operating System
    Windows 10 64-bit

TheLordofTheIoThings's Achievements

  1. Well I figured it out on my own. I used: Invoke-RestMethod http://google.com | findstr example This was effective for some reason although I don't understand why. I'm just glad it parsed it for me but my job isn't done. Now I have to set the last line to a variable, trim and strip the output until I get only the example and not the entire line containing "example".
  2. Thank you, but no luck. I should have said I attempted it with curl too. My bad. It gets my the same result as wget sadly (as in what PowerShell prints in the CLI). The comment out text is still ignored, so I could be doing something wrong on my end. I did have an acquaintance write their work to me, but it doesn't accomplish what I was trying to get at.
  3. Hey guys, hopefully I can explain this well enough to get some answers. I started learning PowerShell for work and school, but I'm still having trouble using it regarding web content, like parsing HTML data. I'm used to DOS/Command Prompt, but today I'm trying to get some HTML text that was commented out using the old <!-- --> tags. I can see it in Chrome with inspect element but I can't get PowerShell to output that comment when I'm using the wget cmdlet. If it helps, I know where it is inside of the HTML script. It's right before the </body> closing tag. I'll post what I've written so far. For privacy reasons I'm not including the page itself. My .ps1 so far: wget https://google.com | findstr example From here I just want to pull that example text (which represents the commented out text) and display it inside of PowerShell when I execute it.
×