Selaa lähdekoodia

1126 crawl tm data

stanley-king 9 vuotta sitten
vanhempi
commit
5970ac95d9
2 muutettua tiedostoa jossa 19 lisäystä ja 30 poistoa
  1. 18 27
      crontab/crawl/fetch_goods.php
  2. 1 3
      run.php

+ 18 - 27
crontab/crawl/fetch_goods.php

@@ -1,6 +1,20 @@
 <?php
 
 require_once (BASE_DATA_PATH . '/api/taobao/TopSdk.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/TopClient.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/ResultSet.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/RequestCheckUtil.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/TopLogger.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/SpiUtils.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/ApplicationVar.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/HttpdnsGetRequest.php');
+
+
+
+
+
+require_once (BASE_DATA_PATH . '/api/taobao/top/request/ItemSellerGetRequest.php');
+require_once (BASE_DATA_PATH . '/api/taobao/top/request/ItemsOnsaleGetRequest.php');
 require_once (BASE_CRONTAB_PATH . '/crawl/product_importer.php');
 require_once (BASE_CRONTAB_PATH . '/crawl/category.php');
 require_once (BASE_CRONTAB_PATH . '/crawl/tmrequest.php');
@@ -10,7 +24,6 @@ require_once (BASE_CRONTAB_PATH . '/crawl/pretreat_tmdata.php');
 require_once (BASE_CRONTAB_PATH . '/crawl/spec_attr.php');
 require_once (BASE_CRONTAB_PATH . '/crawl/upload_file.php');
 require_once (BASE_CRONTAB_PATH . '/crawl/upload_control.php');
-
 require_once (BASE_CORE_PATH . '/framework/libraries/uploadfile.php');
 
 
@@ -25,8 +38,8 @@ date_default_timezone_set('Asia/Shanghai');
 //get_tmdata();
 //handle_db();
 
-//$tmreq = new tmrequest();
-//$tmreq->proc();
+$tmreq = new tmrequest();
+$tmreq->proc();
 
 //get_tmdata();
 //$treater = new pretreat_tmdata();
@@ -35,29 +48,7 @@ date_default_timezone_set('Asia/Shanghai');
 //$spec = new spec_attr();
 //$spec->proc();
 
-$importer = new product_importer();
-$importer->proc();
-
-
-//function upload_image($file)
-//{
-//    $pic_name = '';
-//    $upload = new UploadFile();
-//    $uploaddir = ATTACH_PATH.DS.'store_joinin'.DS;
-//    $upload->set('default_dir',$uploaddir);
-//    $upload->set('allow_type',array('jpg','jpeg','gif','png'));
-//    if (!empty($_FILES[$file]['name'])){
-//        $result = $upload->upfile($file);
-//        if ($result){
-//            $pic_name = $upload->file_name;
-//            $upload->file_name = '';
-//        }
-//    }
-//    return $pic_name;
-//}
-//
-//
-//upload_image(BASE_DATHD_PATH . '/Download/0a006a315a99f917a56bf7c56d18ead1.jpg');
-
+//$importer = new product_importer();
+//$importer->proc();
 
 

+ 1 - 3
run.php

@@ -1,11 +1,10 @@
 
 <?php
 
-echo 'xxx';
 define('BASE_ROOT_PATH',str_replace('\\','/',dirname(__FILE__)));
 
 require_once (BASE_ROOT_PATH . '/fooder.php');
-$gfcgi_run = 0;
+$gfcgi_run = 2;
 
 if($gfcgi_run == 0) { //模拟请求
     $file = BASE_ROOT_PATH . '/debug_run.php';
@@ -15,7 +14,6 @@ if($gfcgi_run == 0) { //模拟请求
 } elseif ($gfcgi_run == 1) {
     $file = BASE_ROOT_PATH . '/research_run.php';   
     include $file;
-
 } else {
     define('StartTime', microtime(true));
     define('TIMESTAMP', time());