Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.0 Not returning Ad results #98

Open
LunarDevelopment opened this issue May 29, 2018 · 5 comments
Open

v0.4.0 Not returning Ad results #98

LunarDevelopment opened this issue May 29, 2018 · 5 comments

Comments

@LunarDevelopment
Copy link

Hello,

I'm doing requests for pretty standard keywords holiday homes cornwall which does have adwords.

Then parsing natural results fine, but if I parse foreach ($gRank->adwordsResults as $i => $position) { I get 0 results.

Is this a Dom issue ?

using google.co.uk

@gsouf
Copy link
Member

gsouf commented May 29, 2018

Hi @LunarDevelopment

I'm not sure it's related to v0.4 because there were no updates that would broke this part of the code.

Can you confirm it was working just before you upgrade?

PS: did you make sure to use the correct method as seen here https://serp-spider.github.io/documentation/search-engine/google/parse-page/#adwords-sections

In your example you are using ->adwordsResults instead of ->getAdwordsResults()

@LunarDevelopment
Copy link
Author

LunarDevelopment commented May 30, 2018

I don't believe it was working pre upgrade.. I'm scraping thousands of terms a day and the last adword record I got was a single result on 2018-05-29 and prior to that 4 results on 2018-05-23.

So it seems to be working 0.0001% of the time..?

$gRank->adwordsResults is the output of $this->adwordsResults = $this->response->getAdwordsResults();

I've tried hundreds of terms while testing and I always get the below from getAdwordsResults()on v0.4.0, I've not had an adword result yet.

object(Serps\Core\Serp\CompositeResultSet)#69 (1) {
  ["resultSets":protected]=>
  array(2) {
    [0]=>
    object(Serps\SearchEngine\Google\AdwordsSectionResultSet)#66 (3) {
      ["location":protected]=>
      string(16) "adws_section_top"
      ["startingAt":protected]=>
      int(0)
      ["items":protected]=>
      array(0) {
      }
    }
    [1]=>
    object(Serps\SearchEngine\Google\AdwordsSectionResultSet)#63 (3) {
      ["location":protected]=>
      string(19) "adws_section_bottom"
      ["startingAt":protected]=>
      int(0)
      ["items":protected]=>
      array(0) {
      }
    }
  }
}

To be honest the adwords results are just being collected as a byproduct which is why they've gone unnoticed but it would be nice to know it's working well / contribute in a small way back to this fantastic library.

@LunarDevelopment
Copy link
Author

Here's an output example:

dom.html.zip

@dlepaux
Copy link

dlepaux commented Jul 4, 2018

Same issue here !

@LunarDevelopment
Copy link
Author

This resolved it's self for me.

Closing because of inactivity..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants