1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Join our Telegram chat: https://t.me/a_parser_en
    Dismiss Notice

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:
    174
    Likes Received:
    30
    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:
    4,377
    Likes Received:
    2,107
    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:
    174
    Likes Received:
    30
    Thanks for the help!
     
    Support likes this.

Share This Page