in reply to Re: Net::Google::WebmasterTools: GWMT error: 404 Not Found
in thread Net::Google::WebmasterTools: GWMT error: 404 Not Found

Thanks Corion, for your effort.

With URL::Encode I am getting this error now:

Undefined subroutine &main::url_encode called at ./Google_Search_Conso +le_API.pl line 12, <DATA> line 2231.

Replies are listed 'Best First'.
Re^3: Net::Google::WebmasterTools: GWMT error: 404 Not Found
by Corion (Patriarch) on Jul 22, 2016 at 13:28 UTC

    Sorry - it seems you need to explicitly import url_encode:

    use URL::Encode 'url_encode';
      With use URL::Encode 'url_encode'; i am getting:
      https://www.googleapis.com/webmasters/v3/sites/https%3A%2F%2Fwww.seafl +ow.de%2Findex.html/searchAnalytics/query Use of uninitialized value in print at ./Google_Search_Console_API.pl +line 49, <DATA> line 2231. Use of uninitialized value in print at ./Google_Search_Console_API.pl +line 49, <DATA> line 2231. Results: 1 - of Can't locate object method "get_source" via package "Net::Google::Webm +asterTools::Row_0" at ./Google_Search_Console_API.pl line 54, <DATA> +line 2231.

        Maybe the results are not what the module expects?

        Consider looking at the data you get back, for example by using Data::Dumper, or by reading the source code of Net::Google::WebmasterTools. Maybe Google discontinued parts of that API?

        As for ->get_source, that method is only ever mentioned in the SYNOPSIS section but nowhere in the implementation. Maybe it is intended that the accessor is somehow autogenerated...