fetch_goods.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_CRONTAB_PATH . '/crawl/importer_check.php');
  28. //require_once (BASE_CORE_PATH . '/framework/libraries/uploadfile.php');
  29. //require_once (BASE_CRONTAB_PATH . '/crawl/skumatcher.php');
  30. date_default_timezone_set('Asia/Shanghai');
  31. function is_excids($cid)
  32. {
  33. //50023728 赠品
  34. //50023725 邮费
  35. //50025832 搭配商品
  36. static $cids = array(50023725,50023728,50025832,121284001,50011150);
  37. return in_array($cid,$cids);
  38. }
  39. function not_null($str)
  40. {
  41. return (empty($str)) ? '' : $str;
  42. }
  43. //$tmreq = new tmrequest();
  44. //$tmreq->proc();
  45. $brander = new brand_operator();
  46. $cat = new category();
  47. $cat->proc();
  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. $brander->update_brand();
  55. //$ichecker = new importer_check();
  56. //$ichecker->proc();