API Question About addTask

Discussion in 'A-Parser Support Forum' started by scrapefun, Jul 27, 2017.

  1. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    114
    Likes Received:
    11
    Based on the sample code given to use a preset:

    Code:
    {
      "password" : "pass",
      "action" : "addTask",
      "data" : {
          "queriesFrom" : "text",
          "queries" : [
            "google.com",
            "yandex.ru"
          ],
          "configPreset" : "default",
          "preset" : "Analyze Domains"
      }
    }
    1) If the preset already has a queries file or multiple queries files defined will the values specified using the "QueriesFrom" and "QueriesFile" options override the queries file values specified in the preset?

    2) Does addTask use the information from the preset about the format and location of the results file or does that need to be specified? I assume it does use the preset values but wasn't sure.

    3) To specify a queries file located in the "results" directory would this be correct?

    "queriesFile": "results/some_sub_directory/queries.txt",


    Thanks!
     
  2. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    1,395
    Likes Received:
    1,105
    When you run via addTask a saved preset, you must specify queriesFrom and queries/queriesFile. Therefore, they override the preset values.
    Yes, if the query does not override any other parameters (except queries), they will be taken from the preset.
    Yes, it will be correct
     
    scrapefun likes this.
  3. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    114
    Likes Received:
    11
    Thanks for the help!
     
    Support likes this.

Share This Page