Hello,
I want to search for a *.mp3 file after the <body> tag in a html file.
I am trying to do this using C.
What is the best way to do this?
Can somebody help me out?
Thank you
Hello,
I want to search for a *.mp3 file after the <body> tag in a html file.
I am trying to do this using C.
What is the best way to do this?
Can somebody help me out?
Thank you
i dont know th file name, i just know it is *.mp3 file and i want to list all the mp3 files in the HTML document
But are those mp3 listed as anchors ? or what?
Maybe you could:
- Load all content of file to a string (don't forget the terminating 0).
- iterate through the string and search for the "<a" If found, you enter a new state/cicle.
- iterate through the string until you find a:
- a) "href=" -> read the name of the file between the "..." or if there aren't " read until the 1º whitespace. Continue main cicle
- b) ">" -> ignore that tag - continue main cicle
Last edited by xErath; 07-05-2005 at 02:17 AM.
hey,
If you are doing it in C its good. But there are many script languages which can be used and gonne be much more easier. Try using perl. Its gonne be very easy and its ment for that. (pattern matching.)
However trying it out on C will enhance ur C knowledge.