Utilizing browser functionality to parse javascript - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Utilizing browser functionality to parse javascript

saridskisaridski Posts: 56Member
Hello,

I am interested in learning how to utilize a browser's functionality, (i.e. Internet Explorer, Mozilla) to parse javascript and HTML in web pages. I would like to try and make a tool similar to a spider, but am having trouble when links are formed in javascript. I would like to use the browser to load pages and then perhaps click on the links within the page. The href that the window is sent to is what I want to be able to get my hands on.

Does anyone have any good ideas?

Look forward to hearing from you.
Regards,
Sarid.

Comments

  • JonathanJonathan Posts: 2,914Member
    Hi,

    : I am interested in learning how to utilize a browser's functionality,
    : (i.e. Internet Explorer, Mozilla) to parse javascript and HTML in web
    : pages. I would like to try and make a tool similar to a spider, but am
    : having trouble when links are formed in javascript. I would like to
    : use the browser to load pages and then perhaps click on the links
    : within the page. The href that the window is sent to is what I want to
    : be able to get my hands on.
    :
    : Does anyone have any good ideas?
    :
    Some HTML elements have a innerHTML property accessible through JavaScript. If the body tag has that property, which I think it may, then you can trigger some JavaScript when the page has fully loaded to grab the innerHTML, and maybe post it somewhere else. Note that this will only handle document.Write style things, if it works at all.

    It may also not be a good idea. ;-) But hope it helps.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • saridskisaridski Posts: 56Member
    : Hi,
    :
    : : I am interested in learning how to utilize a browser's functionality,
    : : (i.e. Internet Explorer, Mozilla) to parse javascript and HTML in web
    : : pages. I would like to try and make a tool similar to a spider, but am
    : : having trouble when links are formed in javascript. I would like to
    : : use the browser to load pages and then perhaps click on the links
    : : within the page. The href that the window is sent to is what I want to
    : : be able to get my hands on.
    : :
    : : Does anyone have any good ideas?
    : :
    : Some HTML elements have a innerHTML property accessible through JavaScript. If the body tag has that property, which I think it may, then you can trigger some JavaScript when the page has fully loaded to grab the innerHTML, and maybe post it somewhere else. Note that this will only handle document.Write style things, if it works at all.
    :
    : It may also not be a good idea. ;-) But hope it helps.
    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
    :
    :
    Thanks for your response.

    I see what you're gettng at. I will look into it. I just want to avoid having to reinvent the wheel (not that I could be arsed to ever embark on such an endeavor). All browsers already have this sort of functionality and i was just hoping to be able to utilize it.

    /Sarid.

Sign In or Register to comment.