Screen scrapping

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adjunct
    New Member
    • Feb 2011
    • 5

    Screen scrapping

    I am thinking of writing a php script that when given a url will parse certain download links and then using the results from the parsing to then scrape those results for a specific link. basically the script will need to go 2 links deep. I was wondering how i would approach this.
    Last edited by adjunct; Feb 22 '11, 09:28 PM. Reason: expressed question better
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Well, high level, what you would do is
    1. Get HTML source for link
    2. Scan source for links
    3. Repeat 1 and 2 with that array of links
    4. Repeat 1 and 2 with the array generated from that array of links


    Just be aware that this is pretty much O(n*m) time. If each page has 10 links then you are looking at downloading 111 pages of data.

    Comment

    Working...