[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to Create Index For web page?

Posted on 2005-04-15
3
Medium Priority
?
255 Views
Last Modified: 2010-04-05
Can some one give me code for reading a web site & generating an Index page giving all the links listed ion the web page.For example if there is a web site giving 5 different categories & with each category having many individual html  pages ,h ow do i get the links of these individual html files in an Index file?
Venkatesh
0
Comment
Question by:venks
3 Comments
 
LVL 5

Expert Comment

by:DeerBear
ID: 13804063
Hi.

I don't have such code at hand, but here's how you should be doing it:

- Navigate to the desired main page
- Using RegExps, extract all links in the page, no matter what.
- Run several threads that navigate to the links and gather all the links.

Now, you'll have a series of links, maybe driven by conditions you set in your program.

Your options at this point may be the most varying, you could just put them in a database and index them this way or
keyword-based, it's up to you. If you know the website and don't need a too general rule, you could just filter your
links accordingly.

HTH,

Andrew
0
 
LVL 1

Author Comment

by:venks
ID: 13804157
Hello Andrew
Thanks for your answer.How ever i want the code to  do the task at hand
Venkatesh
0
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 375 total points
ID: 13805303
uses
  MSHTML_tlb;

 var
  doc: IHTMLDocument2;
  links: IHTMLElementCollection;
  currlink:IHTMLElement;
  i: integer;
begin
  doc := WebBrowser.Document as IHTMLDocument2;
  links := doc.Links;
  for i := 0 to links.length -1 do begin
         currlink := link.Item(i,'') as IHTMLElement;
         Memo1.lines.add(currlink.toString);
  end;
end;

If you do not have MSHTML_TLB, create it by via Project->Import Type Library->Micorsoft HTML Object Library
Deselect 'Generate Component Wrapper', and click 'Create Unit'.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month20 days, 3 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question