卷曲使用:编纂"&"在web参数中

时间:2015-05-19 23:39:08

标签: curl

我遇到问题需要使用curl获取以下网址(在chrome中完美运行)

curl --user "user:pass" -v http://www.reuters.com/finance/stocks/incomeStatement/detail?stmtType=INC'&'perType=INT'&'symbol=GG

有任何线索吗?

1 个答案:

答案 0 :(得分:1)

  1. 使用'标记围绕您的网址:

    curl --user "user:pass" -v 'http://www.reuters.com/finance/stocks/incomeStatement/detail?stmtType=INC&perType=INT&symbol=GG'
    
  2. 使用"标记围绕您的网址:

    curl --user "user:pass" -v "http://www.reuters.com/finance/stocks/incomeStatement/detail?stmtType=INC&perType=INT&symbol=GG"
    
  3. 转义&个字符:

    curl --user "user:pass" -v http://www.reuters.com/finance/stocks/incomeStatement/detail?stmtType=INC\&perType=INT\&symbol=GG