当前位置: 首页 > news >正文

基于Hive大数据分析springboot为后端以及vue为前端的的民宿系

标题基于Hive大数据分析springboot为后端以及vue为前端的的民宿系

本文介绍了如何利用Hive进行大数据分析,并结合Spring Boot和Vue构建了一个民宿管理系统。该民民宿管理系统包含用户和管理员登陆注册的功能,发布下架酒店信息,模糊搜索,酒店详情信息展示,收藏以及对收藏的酒店进行排序可视化,管理员发布,添加用户的功能。

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

1. 数据采集

通过 Python 爬虫实现数据采集,并将采集到的数据存储到数据库中。这些数据将作为我们民宿系统的基础数据,在后续的处理和分析中发挥重要作用。我们首先使用 Python 爬虫从艺龙酒店获取民宿相关信息,包括房源信息、评论信息、价格信息等。以下是一个简单的示例代码,使用 BeautifulSoup 库进行网页解析,并通过 requests 库发送 HTTP 请求获取网页内容。

import json
import timeimport requestsfrom request_data.sync_data2mysql import request_data2mysqlhotels_data = []class YiLongList:def __init__(self,inDate,outDate,city):self.inDate,self.outDate = inDate,outDateself.city = cityself.session = requests.Session()def jxList(self,hotelList):for h in hotelList:hotelName = h.get("hotelName")starLevelDes = h.get("starLevelDes")commentScore = h.get("commentScore")price = h.get("price")commentScoreDes = h.get("commentScoreDes")commentMainTag = h.get("commentMainTag")commentCount = h.get("commentCount")hotelAddress = h.get("hotelAddress")trafficInfo = h.get("trafficInfo")areaName = h.get("areaName")hotelTags = h.get("hotelTags")if hotelTags:hotelTags = "|".join([i.get("tagName") for i in hotelTags])themeList = "|".join(h.get("themeList"))recallReason = h.get("recallReason")[0]data = {'hotelName': hotelName,'starLevelDes': starLevelDes,'commentCount': commentCount,'price': price,'commentScore': commentScore,'commentScoreDes': commentScoreDes,'areaName': areaName,'hotelTags': hotelTags,'themeList': themeList,'recallReason': recallReason,'commentMainTag': commentMainTag,'hotelAddress': hotelAddress,'trafficInfo': trafficInfo}hotels_data.append(data)print(hotelName,starLevelDes,commentCount,price,commentScore,commentScoreDes,\areaName,hotelTags,themeList,recallReason,commentMainTag,hotelAddress,trafficInfo,)def getList(self,page,traceToken):url = "https://hotel.elong.com/tapi/v2/list"headers = {"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,zh-TW;q=0.5","Referer": "https://hotel.elong.com/hotel/hotellist?city=0101&inDate=2024-03-23&outDate=2022-03-24&filterList=8888_1&pageSize=20&t=1669994718934","User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.62","accept": "application/json, text/plain, */*","deviceid": "c2a61f65-fa3e-4360-8ccd-4093f4f99f41","traceid": "4630a377-472b-4765-852f-959e2fa139cd"}if page == 0:params = {"city": self.city,"inDate": self.inDate,"outDate": self.outDate,"filterList": "8888_1","pageIndex": str(page),"pageSize": "20","sugActInfo": ""}else:params = {"city"
http://www.lryc.cn/news/327989.html

相关文章:

  • pnpm、monorepo分包管理、多包管理、npm、vite、前端工程化、保姆级教程
  • vue3封装Element分页
  • 真机 ARM64 架构转模拟器 ARM64 架构
  • 敏捷教练CSM认证考了有没有用,谁说了算?
  • Docker-Container
  • 下载安装anaconda和pytorch的详细方法,以及遇到的问题和解决办法
  • 2020年天津市二级分类土地利用数据(矢量)
  • 设计模式——结构型——外观模式Facade
  • OpenGL的MVP矩阵理解
  • 前端超分辨率技术应用:图像质量提升与场景实践探索-设计篇
  • C++11入门手册第一节,学完直接上手Qt(共两节)
  • Docker部署MinIO对象存储服务
  • 基于Echarts的超市销售可视化分析系统(数据+程序+论文)
  • 使用ai智能写作场景之gpt整理资料,如何ai智能写作整理资料
  • C/C++ 内存管理
  • android pdf框架-10,相册浏览
  • 基于SSM的高校普法系统(有报告)。Javaee项目。ssm项目。
  • 数据结构刷题篇 之 【力扣二叉树基础OJ】详细讲解(含每道题链接及递归图解)
  • Jackson 2.x 系列【6】注解大全篇二
  • 在低成本loT mcu上实现深度神经网络端到端自动部署-深度神经网络、物联网、边缘计算、DNN加速——文末完整资料
  • 【linux】基础IO |文件操作符
  • 探索 2024 年 Web 开发最佳前端框架
  • 解决: MAC ERROR [internal] load metadata for docker.io/library/openjdk:17
  • View事件分发
  • 监听页面的使用时间
  • 【 yolo红外微小无人机-直升机-飞机-飞鸟目标检测】
  • Redis与数据库的一致性
  • 使用maxwell实时同步mysql数据到kafka
  • 知识图谱与大数据:区别、联系与应用
  • Nagios工具