fetch_goods.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. define('InShopNC',true);
  3. defined('InShopNC') or exit('Access Invalid!');
  4. require_once (BASE_DATA_PATH . '/api/taobao/TopSdk.php');
  5. require_once (BASE_DATA_PATH . '/api/taobao/top/TopClient.php');
  6. require_once (BASE_DATA_PATH . '/api/taobao/top/ResultSet.php');
  7. require_once (BASE_DATA_PATH . '/api/taobao/top/RequestCheckUtil.php');
  8. require_once (BASE_DATA_PATH . '/api/taobao/top/TopLogger.php');
  9. require_once (BASE_DATA_PATH . '/api/taobao/top/SpiUtils.php');
  10. require_once (BASE_DATA_PATH . '/api/taobao/top/ApplicationVar.php');
  11. require_once (BASE_DATA_PATH . '/api/taobao/top/HttpdnsGetRequest.php');
  12. require_once (BASE_DATA_PATH . '/api/taobao/top/request/ItemSellerGetRequest.php');
  13. require_once (BASE_DATA_PATH . '/api/taobao/top/request/ItemsOnsaleGetRequest.php');
  14. require_once (BASE_CRONTAB_PATH . '/crawl/fetch_config.php');
  15. require_once (BASE_CRONTAB_PATH . '/crawl/product_importer.php');
  16. require_once (BASE_CRONTAB_PATH . '/crawl/category.php');
  17. require_once (BASE_CRONTAB_PATH . '/crawl/tmrequest.php');
  18. require_once (BASE_CRONTAB_PATH . '/crawl/page_request.php');
  19. require_once (BASE_CRONTAB_PATH . '/crawl/class_tree.php');
  20. require_once (BASE_CRONTAB_PATH . '/crawl/pretreat_tmdata.php');
  21. require_once (BASE_CRONTAB_PATH . '/crawl/spec_attr.php');
  22. require_once (BASE_CRONTAB_PATH . '/crawl/spec_attr_parser.php');
  23. require_once (BASE_CRONTAB_PATH . '/crawl/upload_file.php');
  24. require_once (BASE_CRONTAB_PATH . '/crawl/upload_control.php');
  25. require_once (BASE_CRONTAB_PATH . '/crawl/tm_pagereq.php');
  26. require_once(BASE_CRONTAB_PATH . '/crawl/brand_operator.php');
  27. //require_once (BASE_CORE_PATH . '/framework/libraries/uploadfile.php');
  28. //require_once (BASE_CRONTAB_PATH . '/crawl/skumatcher.php');
  29. date_default_timezone_set('Asia/Shanghai');
  30. function is_excids($cid)
  31. {
  32. //50023728 赠品
  33. //50023725 邮费
  34. //50025832 搭配商品
  35. static $cids = array(50023725,50023728,50025832,121284001,50011150);
  36. return in_array($cid,$cids);
  37. }
  38. function not_null($str)
  39. {
  40. return (empty($str)) ? '' : $str;
  41. }
  42. //$tmreq = new tmrequest();
  43. //$tmreq->proc();
  44. $treater = new brand_operator();
  45. //$cat = new category();
  46. //$cat->proc();
  47. //
  48. //$treater = new pretreat_tmdata();
  49. //$treater->proc(false);
  50. //$spec = new spec_attr_parser();
  51. //$spec->proc();
  52. $importer = new product_importer();
  53. //$importer->proc_shop();
  54. $importer->proc();
  55. //
  56. //
  57. $treater->update_brand();