使用GET方法在谷歌中搜索

时间:2016-06-03 13:49:02

标签: python python-2.7 google-search

我想使用GET方法查询google并检索HTML结果。我尝试过以下方法:

select 
    fq.fk_spEngineerID, 
    fq.spQuoteID,
    fq.spOrderID, 
    fq.BU,
    fq.spProductTypeID, 
    fq.fk_spCompanyID, 
    fq.fk_spOfficeID
From (
    Select 
        fk_spEngineerID, 
        spQuoteID,
       NULL as spOrderID,
        BU, 
        spProductTypeID, 
        fk_spCompanyID, 
        fk_spOfficeID, 
From QuotestatsSubQuery 
Union All 
     Select 
        fk_spEngineerID,
        NULL as spQuoteID,
        spOrderID,
        BU, 
        spProductTypeID, 
        fk_spCompanyID, 
        fk_spOfficeID 
    From OrderstatsSubQuery
) as fq 
Group By  
    fq.fk_spEngineerID,
    fq.spQuoteID,
    fq.spOrderID,  
    fq.BU, 
    fq.spProductTypeID, 
    fq.fk_spCompanyID, 
    fq.fk_spOfficeID;

但是我收到了这个错误:

  

400错误请求

有人知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

您想要做的是已经弃用了。您可以查看以下链接以供参考。

https://developers.google.com/web-search/

代替谷歌已经提供了新的API。

https://developers.google.com/custom-search/json-api/v1/overview

以上链接将为您提供有关如何使用它的完整信息。

您必须创建一个密钥,并且需要更改您的代码以使其正常工作。

相关问题