Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

HTML Search/Filter specific text on a website

barcode

New Coder
Hi all,

How would you go ahead in finding specific text on a site, is that doable ? In my case it would be a video game where you can find different gear stats. On the website there is a search bar where you can type in the name of the gear among other stuff and find the related stats for that gear but not the other way around.
For example I need to find all Gears that deal either between 10% to 20% damage and use either between 3 to 5 AP (action points). So if Gear 1 and 2 deal precisely 15% damage using 4 AP and Gear 3 deals precisely 15% damage using 7 AP, than only the webpages for Gear 1 and 2 would show up. Something like this :

Code:
<div class="Gear"><h2>Gear 1</h2></div>
Code:
<div class="block"><h3>Damage1</h3> <p>15%</p></div>

It would be a useful resource for different websites too tbh. Don't know if it as easy to do on one website as it is on another ?
I think you can already tell I'm quiet an amateur so please bear with me. If something is unclear tell me.

Thanks alot
 
That is doable if you do it right. If it is a website in an iframe forget it. You might try holding variables for what is in Javascript and updating your HTML accordingly. You could also just search the HTML but that is harder. It would help to know exactly which elements to find text in. I think either giving each an ID or something could help. Anyway, you have some work ahead.If you do it correct, about same, but may vary in hardness. X E.
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom