我可以发送结果而不是存储在JSON文件中,将其发送到PHP吗?
我有这两个文件
settings.json
{
"outputFile" : "C:\\wamp\\www\\drestip\\admin\\crawls\\mimshoes.json",
"logFile" : "C:\\wamp\\www\\drestip\\admin\\crawls\\mimshoes.tsv",
"pause" : 1,
"local" : false,
"connections" : 3,
"cookiesEnabled" : false,
"robotsDisabled" : false,
"advancedMode" : true,
"crawlTemplate" : [ "www.mimshoes.com/" ],
"startUrls" : [ PAGES ],
"maxDepth" : 10,
"dataTemplate" : [ "www.mimshoes.com/{alpha}-{alpha}_{alpha}-{alpha}$" ],
"destination" : "JSON",
"connectorGuid" : "xxxxxxxxxxxxxxxxxxxxxxxx",
"canonicalDisabled" : false
}user.json
{
"userGuid": "xxxxxxxxxxxxxxxxxxxx",
"apiKey": "xxxxxxxxxxxxxxx"
}命令行:
C:\Users\creatingweb03\AppData\Roaming\import.io\import.ioc.exe -crawl settings.json user.json发布于 2016-03-23 16:33:00
如果在settings.json中使用“目标”参数,则可以将结果直接发布到API端点。
// The url that crawled data will be HTTP POSTed to
"target" : "http://localhost:9200/index/datatype",这里有更多的信息:
import.io命令行爬行器
https://stackoverflow.com/questions/36181675
复制相似问题