Douyin seo source code packaging and sharing

Douyin seo source code construction----share it with all developers

获取视频列表
        $Video_model = new App_Model_Douyin_MysqlVideoStorage();
        $video_list = $Video_model->getList($where,$this->index,$this->count,$sort);
        $temp_video_model   = new App_Model_Douyin_MysqlVideoTempVideoStorage($this->sid);
        $pailie_video_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage();
        foreach ($video_list as &$item) {
            $item['cache_num']  = $temp_video_model->getTempVideoCountByItem($item['dv_id']);
            $item['pailie']     = $pailie_video_model->getRowByDvid($item['dv_id']);

            $progerss   = 40;
            if ($item['video_num'] > 0 || $item['image_num'] > 0) {
                $progerss += 10;
            }
            if ($item['audio_num'] > 0 || $item['write_num'] > 0) {
                $progerss += 10;
            }
            if ($item['pailie']['dvmp_is_zuhe']) {
                $progerss += 20;
            }
            if ($item['cache_num'] > 0) {
                $progerss += 20;
            }

            $item['progress']   = $progerss;
        }

        //计算分页
        $active_list_all = $Video_model->getCount($where);
        $page_libs = new Libs_Pagination_Paginator($active_list_all,$this->count,'jquery',true);
        $pageHtml = $page_libs->render();

        $this->output['time_range']     = $time_range;
        $this->output['keyword_type']   = $keyword_type;
        $this->output['keyword']        = $keyword;
        $this->output['video_list']     = $video_list;
        $this->output['pageHtml']       = $pageHtml;

        $this->output['progress_line'] = [
            20 => ['color' => 'red', 'tip' => 'Creation of creative project completed'],
            40 => ['color' => 'red ', 'tip' => 'Selecting mixed cutting mode has been completed'],
            50 => ['color' => 'orange', 'tip' => 'Adding audio and video material has not been completed'],
            60 => [' color' => 'orange', 'tip' => 'Adding audio and video materials has been completed'],
            70 => ['color' => 'blue', 'tip' => 'Video mixing and editing has been completed'] ,
            80 => ['color' => 'blue', 'tip' => 'Video mixing and editing combination completed'], 90 => ['
            color' => 'green','tip' => 'Video caching has been completed'],
            100 => ['color' => 'green', 'tip' => 'All steps of the project have been completed'], ];
        $
        this->output_mode_link();
        $this->displaySmarty('dydqtshoppc/video/item-list.tpl');
    }
    /*
     *Clip mode link

Douyin SEO source code development and deployment environment configuration : To configure Douyin SEO source code development environment, you need to complete the following steps: Install PHP: Please download Python from the official website and install it.

Install Django: Please enter the following command at the command line to install Django:

pip install django
to install other dependent libraries: Please enter the following commands on the command line to install other required dependent libraries:

pip install -r requirements.txt
Please note that you need to run this command in the project root directory.

Run the development server: Please enter the project root directory on the command line and enter the following command:

python manage.py runserver
This command will start the Django development server and listen to the local port 8000.

Configure the database: If the project needs to use a database, please configure the database connection in the settings.py file of the Django project. You can use SQLite, MySQL or PostgreSQL.

Run migration: Please enter the project root directory in the command line and enter the following command:

python manage.py migrate
This command creates database tables or upgrades table structures to match the model.

After configuring the environment, the editor will share the product logic and development process of Douyin SEO source code development.

 Product development logic:
1. Multi-account management: First, Douyin Matrix needs to meet users’ one-stop management needs to support multiple platforms and multiple accounts.

2. Video batch editing and distribution: The construction of Douyin SEO matrix source code also needs to be able to realize batch editing of video content and scheduled distribution of tasks to solve the problem of collaboration among enterprise departments.

3. Data statistics: data tracking and data analysis of distributed content to meet user data review needs

4. Fan portrait distribution, intelligent customer service: distribution of fan areas, age, etc., intelligent online customer service access, etc. to improve corporate fan accumulation

5. Douyin mini program development and access: realizing multi-channel and multi-entry clue collection

       //获取视频列表
        $Video_model = new App_Model_Douyin_MysqlVideoStorage();
        $video_list = $Video_model->getList($where,$this->index,$this->count,$sort);
        $material_model = new App_Model_Douyin_MysqlVideoMaterialStorage($this->sid);
        $temp_video_model   = new App_Model_Douyin_MysqlVideoTempVideoStorage($this->sid);
        $pailie_video_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage();
        foreach ($video_list as &$item) {
            $item['video_num']  = $material_model->getMaterialCountByVideo($item['dv_id'], 1);
            $item['audio_num']  = $material_model->getMaterialCountByVideo($item['dv_id'], 2);
            $item['image_num']  = $material_model->getMaterialCountByVideo($item['dv_id'], 3);
            $item['title_num']  = $material_model->getMaterialCountByVideo($item['dv_id'], 4);
            $item['write_num']  = $material_model->getMaterialCountByVideo($item['dv_id'], 5);
            $item['cache_num']  = $temp_video_model->getTempVideoCountByItem($item['dv_id']);
            $item['pailie']     = $pailie_video_model->getRowByDvid($item['dv_id']);

            $progerss   = 40;
            if ($item['video_num'] > 0 || $item['image_num'] > 0) {
                $progerss += 10;
            }
            if ($item['audio_num'] > 0 || $item['write_num'] > 0) {
                $progerss += 10;
            }
            if ($item['pailie']['dvmp_is_zuhe']) {
                $progerss += 20;
            }
            if ($item['cache_num'] > 0) {
                $progerss += 20;
            }

            $item['progress']   = $progerss;
        }

        //计算分页
        $active_list_all = $Video_model->getCount($where);
        $page_libs = new Libs_Pagination_Paginator($active_list_all,$this->count,'jquery',true);
        $pageHtml = $page_libs->render();

        $this->output['add_time_range'] = $add_time_range;
        $this->output['keyword_type']   = $keyword_type;
        $this->output['keyword']        = $keyword;
        $this->output['video_list']     = $video_list;
        $this->output['pageHtml']       = $pageHtml;
        $video_mixed_mode   = plum_parse_config('project_mixed_mode', 'dydqt/project');
        $this->output['video_mixed_mode']   = $video_mixed_mode;
        $this->output['progress_line']  = [

Guess you like

Origin blog.csdn.net/xiaosaina/article/details/131655617