@@ -541,7 +541,7 @@ protected function getDownloadUrls($site)
541
541
{
542
542
$ url = sprintf (
543
543
self ::SERVICEURI .'downloads-list?hl=%s&siteUrl=%s ' ,
544
- $ this ->_language , urlencode ($ site )
544
+ $ this ->getLanguage () , urlencode ($ site )
545
545
);
546
546
$ downloadList = $ this ->getData ($ url );
547
547
@@ -561,13 +561,13 @@ private function downloadCSV_XTRA($site, $tableName, DateTime $dateStart, DateTi
561
561
562
562
$ uri = sprintf (
563
563
self ::SERVICEURI . $ options ['token_uri ' ] . '?hl=%s&siteUrl=%s ' ,
564
- $ this ->_language , $ site
564
+ $ this ->getLanguage () , $ site
565
565
);
566
566
$ token = $ this ->getToken ($ uri , $ options ['token_delimiter ' ], $ options ['dl_uri ' ]);
567
567
568
568
$ url = sprintf (
569
569
self ::SERVICEURI . $ options ['dl_uri ' ] . '?hl=%s&siteUrl=%s&security_token=%s&prop=ALL&db=%s&de=%s&more=true ' ,
570
- $ this ->_language , $ site , $ token , $ dateStart ->format ('Ymd ' ), $ dateEnd ->format ('Ymd ' )
570
+ $ this ->getLanguage () , $ site , $ token , $ dateStart ->format ('Ymd ' ), $ dateEnd ->format ('Ymd ' )
571
571
);
572
572
573
573
return $ this ->getData ($ url );
@@ -602,7 +602,7 @@ private function downloadCSV_CrawlErrors($site, $separated = false)
602
602
$ finalName = "$ savepath/CRAWL_ERRORS- $ typename- $ sortname- $ filename.csv " ;
603
603
$ url = sprintf (
604
604
self ::SERVICEURI . 'crawl-errors-dl?hl=%s&siteUrl=%s&security_token=%s&type=%s&sort=%s ' ,
605
- $ this ->_language , $ site , $ token , $ typeid , $ sortid
605
+ $ this ->getLanguage () , $ site , $ token , $ typeid , $ sortid
606
606
);
607
607
608
608
// TODO: find a better solution - this one might require a lot of memory
@@ -616,7 +616,7 @@ private function downloadCSV_CrawlErrors($site, $separated = false)
616
616
$ token = $ this ->getToken ($ uri , 'x26 ' );
617
617
$ url = sprintf (
618
618
self ::SERVICEURI .'crawl-errors-dl?hl=%s&siteUrl=%s&security_token=%s&type=0 ' ,
619
- $ this ->_language , $ site , $ token
619
+ $ this ->getLanguage () , $ site , $ token
620
620
);
621
621
622
622
return $ this ->getData ($ url );
@@ -637,7 +637,7 @@ public function downloadCSV($site, $savepath = '.')
637
637
$ tables = $ this ->_tables ;
638
638
foreach ($ tables as $ table ) {
639
639
$ this ->saveData (
640
- $ this ->getTableData ($ table , $ site , $ this ->_dateStart , $ this ->_dateEnd , $ this ->_language ),
640
+ $ this ->getTableData ($ table , $ site , $ this ->_dateStart , $ this ->_dateEnd , $ this ->getLanguage () ),
641
641
"$ savepath/ $ table- $ filename.csv "
642
642
);
643
643
}
0 commit comments