Menu

Retrieve two values ​​for each url in a csv file

Help
Anonymous
2017-07-07
2017-07-07
  • Anonymous

    Anonymous - 2017-07-07

    Hello,

    I would like to crawl a website and retrieve two values (for example the contents of div 1 and div 2) for each url and export these 3 fields into a csv, each line corresponding to a url and these two values.

    How can this be achieved ?
    Thank you in advance for your help.

     
  • James Shaver

    James Shaver - 2017-07-07

    Hi,
    Sure you can. Use phpcrawl to generate the URLs, then write a script of your own to parse the pages for the data you want.

    I would suggest using the HTML DOM:
    $html = str_get_html($file_contents);
    $elem = $html->find('div[id=content]', 0);

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.