@@ -86,22 +86,6 @@ class Gwt_Client
86
86
*/
87
87
protected $ _dateEnd ;
88
88
89
- /**
90
- * Downloaded files
91
- *
92
- * @deprecated
93
- * @var array
94
- */
95
- public $ _downloaded = array ();
96
-
97
- /**
98
- * Skipped tables
99
- *
100
- * @deprecated
101
- * @var array
102
- */
103
- public $ _skipped = array ();
104
-
105
89
/**
106
90
* After successful login will contain auth key
107
91
*
@@ -143,7 +127,6 @@ public function getAllowedTableNames()
143
127
return array (
144
128
'TOP_PAGES ' ,
145
129
'TOP_QUERIES ' ,
146
- 'CRAWL_ERRORS ' ,
147
130
'CONTENT_ERRORS ' ,
148
131
'CONTENT_KEYWORDS ' ,
149
132
'INTERNAL_LINKS ' ,
@@ -205,9 +188,6 @@ function ($item)
205
188
public function getTableData ($ tableName )
206
189
{
207
190
switch ($ tableName ) {
208
- case 'CRAWL_ERRORS ' :
209
- $ data = $ this ->downloadCSV_CrawlErrors ($ this ->getWebsite ());
210
- break ;
211
191
case 'CONTENT_ERRORS ' :
212
192
case 'CONTENT_KEYWORDS ' :
213
193
case 'INTERNAL_LINKS ' :
@@ -238,41 +218,6 @@ public function getTableData($tableName)
238
218
return $ data ;
239
219
}
240
220
241
- /**
242
- * Get errors list
243
- *
244
- * @return array
245
- */
246
- private function getErrTablesSort ()
247
- {
248
- return array (
249
- 0 => 'http ' ,
250
- 1 => 'not-found ' ,
251
- 2 => 'restricted-by-robotsTxt ' ,
252
- 3 => 'unreachable ' ,
253
- 4 => 'timeout ' ,
254
- 5 => 'not-followed ' ,
255
- 'kAppErrorSoft-404s ' => 'soft404 ' ,
256
- 'sitemap ' => 'in-sitemaps ' ,
257
- );
258
- }
259
-
260
- /**
261
- * Get error types
262
- *
263
- * @return array
264
- */
265
- private function getErrTableTypes ()
266
- {
267
- return array (
268
- 0 => 'web-crawl-errors ' ,
269
- 1 => 'mobile-wml-xhtml-errors ' ,
270
- 2 => 'mobile-chtml-errors ' ,
271
- 3 => 'mobile-operator-errors ' ,
272
- 4 => 'news-crawl-errors ' ,
273
- );
274
- }
275
-
276
221
/**
277
222
* Get options for given table
278
223
*
@@ -462,27 +407,6 @@ public function addProcessor(Gwt_Processor_ProcessorInterface $processor)
462
407
return $ this ;
463
408
}
464
409
465
- /**
466
- * Returns array of downloaded filenames.
467
- *
468
- * @return array Array of filenames that have been written to disk.
469
- */
470
- public function getDownloadedFiles ()
471
- {
472
- return $ this ->_downloaded ;
473
- }
474
-
475
- /**
476
- * Returns array of downloaded filenames.
477
- *
478
- * @return array Array of skipped tables (no data or was not able to save)
479
- * @deprecated
480
- */
481
- public function getSkippedFiles ()
482
- {
483
- return $ this ->_skipped ;
484
- }
485
-
486
410
/**
487
411
* Attempts to log into the specified Google account.
488
412
*
@@ -652,56 +576,6 @@ private function downloadCSV_XTRA($site, $tableName, DateTime $dateStart, DateTi
652
576
return $ this ->getData ($ url );
653
577
}
654
578
655
- /**
656
- * Downloads the Crawl Errors file based on the given URL.
657
- *
658
- * @todo Make separated crawl errors accessible
659
- * @param string $site Site URL available in GWT Account.
660
- * @param bool $separated Optional: If true, the method saves separated CSV files
661
- * for each error type. Default: Merge errors in one file.
662
- * @return $this
663
- */
664
- private function downloadCSV_CrawlErrors ($ site , $ separated = false )
665
- {
666
- $ type_param = 'we ' ;
667
- //$filename = parse_url($site, PHP_URL_HOST) . '-' . date('Ymd-His');
668
- if ($ separated ) {
669
- $ data = array ();
670
- foreach ($ this ->getErrTablesSort () as $ sortid => $ sortname ) {
671
- foreach ($ this ->getErrTableTypes () as $ typeid => $ typename ) {
672
- if ($ typeid == 1 ) {
673
- $ type_param = 'mx ' ;
674
- } else if ($ typeid == 2 ) {
675
- $ type_param = 'mc ' ;
676
- } else {
677
- $ type_param = 'we ' ;
678
- }
679
- $ uri = self ::SERVICEURI . "crawl-errors?hl=en&siteUrl= $ site&tid= $ type_param " ;
680
- $ token = $ this ->getToken ($ uri , 'x26 ' );
681
- $ finalName = "$ savepath/CRAWL_ERRORS- $ typename- $ sortname- $ filename.csv " ;
682
- $ url = sprintf (
683
- self ::SERVICEURI . 'crawl-errors-dl?hl=%s&siteUrl=%s&security_token=%s&type=%s&sort=%s ' ,
684
- $ this ->getLanguage (), $ site , $ token , $ typeid , $ sortid
685
- );
686
-
687
- // TODO: find a better solution - this one might require a lot of memory
688
- $ data [$ sortname ][$ typename ] = $ this ->getData ($ url );
689
- }
690
- }
691
-
692
- return $ data ;
693
- } else {
694
- $ uri = self ::SERVICEURI ."crawl-errors?hl=en&siteUrl= $ site&tid= $ type_param " ;
695
- $ token = $ this ->getToken ($ uri , 'x26 ' );
696
- $ url = sprintf (
697
- self ::SERVICEURI .'crawl-errors-dl?hl=%s&siteUrl=%s&security_token=%s&type=0 ' ,
698
- $ this ->getLanguage (), $ site , $ token
699
- );
700
-
701
- return $ this ->getData ($ url );
702
- }
703
- }
704
-
705
579
/**
706
580
* Regular Expression to find the Security Token for a download file.
707
581
*
0 commit comments