News APP system based on Vue.js front-end + JavaSSM + Scrapy crawler

Table of contents
Abstract I
Abstract II
1 Introduction 1
1.1 Research background 1
1.2 Research purpose and significance 1
1.3 Research content 2
1.4 Structure of the paper 2
1.5 Summary of this chapter 2
2 Research on development technical solutions 3
2.1 Overview of Spring and SpringMVC framework 3
2.2 Overview of Scrapy framework 4
2.3 Overview of Mybatis framework 4
2.5 Summary of this chapter 5
3 System analysis and design 6
3.1 System feasibility analysis 6
3.2 System development environment 6
3.3 System requirements analysis 6
3.4 System function design 14
3.5 Database analysis and design 19
3.6 Class design 26
3.7 This chapter Summary 26
4 Implementation of the system 27
4.1 Implementation of the information reading function 27
4.2 Implementation of the collection and like function 31
4.3 Implementation of the comment reply function 32 4.4
Implementation of the information sharing function 33
4.5 Implementation of browsing history and system notification functions 33
4.6 Reader personal information Implementation of viewing and modifying functions 34
4.7 Information management function 34
4.8 Implementation of comment and announcement management functions 37
4.9 Implementation of reader management function 38
4.10 Implementation of recommended function 39
4.11 Summary of this chapter 40
5 Conclusion and outlook
41 5.1 Main work and conclusions of this topic 41
5.2 Issues for further research 41
References 42
Acknowledgments 43
1.3 Research content
This topic is divided into information news There are two parts: the reading APP backend management system and the information news reading APP.
The development of the information and news reading APP is based on the H5 platform. The front-end uses the MUI framework. The information and news reading background management system uses the Layui framework as the front-end framework. The backend is developed using the SSM framework.
This topic analyzes the needs of news reading enthusiasts for news and other information subjects and the actual situation, and uses UML language to model system requirements. The roles of this system can be divided into visitors, readers, and backend administrators. The main entities involved in this system include reader entities, administrator entities, news entities, video entities, album entities, comment entities, channel entities, announcement entities, etc. Visitors can read news, view videos, and browse photo albums. The core functions of readers are to read news, view videos, and browse photo albums. In addition, readers can also comment on, collect, like, share, receive system notifications, view and modify personal information on reading content. Backend management personnel are responsible for basic functions such as video management, news management, album management, user management, comment management, channel management, and notification publishing.
1.4 Structure of the paper
The specific content structure of this paper is as follows:
Chapter 1: Introduction. Describes the research background, research purpose, research significance and research content of this topic, and clarifies the organizational structure of the paper.
Chapter 2: Research on development technical solutions. Mainly outlines the relevant frameworks involved in the system development process.
Chapter 3: System Analysis and Design. System feasibility analysis, system development environment selection, system requirements analysis, system function design, database analysis and design, and class design.
Chapter 4: System implementation. Here we mainly use screenshots to show the functions implemented by this topic.
Chapter 5: Conclusion and outlook. This chapter mainly provides an in-depth analysis and summary of this topic, puts forward the problems and shortcomings of the system, and the directions for further research.

# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy.pipelines.files import FilesPipeline
from twisted.enterprise import adbapi
from Newscontent.data.bldbhelper import BLDBHelper
#
from Newscontent.data.dbhelper import DBHelper
from scrapy.http import Request

class VideoPipeline(FilesPipeline):
    def get_media_requests(self, item, info):
        # 处理对象:每组item中的每张图片
        for video_url in item['file_urls']:
            yield Request(video_url, meta={
    
    'item': item})

    def file_path(self, request, response=None, info=None):
        image_name = request.meta['item']['name']
        videooriginurl =request.url
        self.db = BLDBHelper()
        videoidt = self.db.selectVideobyurl(videooriginurl)
        videoidI=videoidt[0][0]
        videoid= str(videoidI)
        print(videoidI)
        print(type(videoidI))
        mp4='.mp4'
        print(type(mp4))
        videoname=videoid+mp4
        print(videoname)
        path = image_name + '/'+videoname
        print(path)
        print("!!!!!!!!!!!!!!!!!!!!!!!!")
        return path


class MysqlTwistedPipeline(object):

    def __init__(self):
        self.db = DBHelper()

    def process_item(self, item, spider):
        # 插入数据库
        self.db.insert(item,spider)
        return item

class MysqlupdatecontentPipeline(object):

    def __init__(self):
        self.db = DBHelper()
    def process_item(self, item, spider):
        # 插入数据库
        self.db.update(item,spider)
        return item





Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/newlw/article/details/132752276