Google Parser: Save only partial results

Discussion in 'A-Parser Support Forum' started by scrapefun, Jun 12, 2015.

  1. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    184
    Likes Received:
    34
    I'm scraping the top 10 for Google and then coming back and scraping the top 100 (just hte first page when showing 100 results at a time.

    Is there a way to just save results 11-100 when scraping the 100 links per page (basically skipping the export of the top 10)
     
  2. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    4,545
    Likes Received:
    2,163
    Yes, this is the way it is. It is enough take advantage of the Template Toolkit, and set a Result format:
    Code:
    [% FOREACH link IN serp %][% IF loop.count > 10 %][% serp.${loop.count}.link %][% END %]
    [% END %]
    [​IMG]

    P.S. And there's another way, maybe a little easier: instead of the above mentioned code to enter in Result format
    Code:
    $serp.slice(10, 99).format('$link\n')
     
    #2 Support, Jun 12, 2015
    Last edited by a moderator: Jun 13, 2015
  3. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    184
    Likes Received:
    34
    perfect! Thank you for your help.
     
    Support likes this.

Share This Page