fetch_goods.php 2.7 KB

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