0

I'm writing a program (in Java) that needs to extract links from webpages. I'm using htmlParser (http://htmlparser.sourceforge.net/) but I'm only able to extract html links (defined with <a href="...">) and I don't know how to handle javascript code to extract links from... can you help me??

4
  • 1
    There are some missing parts in your question. Is it formatting issue? Commented Aug 13, 2009 at 13:18
  • Please edit your question : it's hard to understand what you mean. Commented Aug 14, 2009 at 14:04
  • I can't understand why it's hard to understand what I mean, is it because of my poor english? Please tell me more. Commented Aug 14, 2009 at 15:10
  • @Raffo did my answer helped? Commented Feb 13, 2016 at 14:35

3 Answers 3

2

You can use Rhino with DOM environment, written in JavaScript.
By the way it is written by John Resig.

Sign up to request clarification or add additional context in comments.

1 Comment

I've never played with DOM, but I'll take a look at your link, thanks.
0

HTML Parser from sourceforge is useful. I have used it to parse a whole bunch of HTML already. However, parsing JS is different. Cheers.

Comments

0

This is probally the most comprehensive tool out there. Rhino . Everything you want to do can be done with Rhino.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.