Replication Data for: Analysis of Chinese Society's Emotional Perception in the Background of China-US Trade War Based on Weibo Public Opinion
收藏DataCite Commons2020-07-29 更新2024-07-13 收录
下载链接:
http://opendata.pku.edu.cn/citation?persistentId=doi:10.18170/DVN/6HHMGY
下载链接
链接失效反馈官方服务:
资源简介:
This document contains content: Data source, acquisition and processing methods, data format and usage; data description @author: j @finished_date:20190317 #### Data Sources Sina Weibo official website www.weibo.com #### Acquisition and processing methods 1 Use the python language to write crawlers, use the Sina Weibo search function, and crawl all the blog posts from April to September 2018 in the “Comprehensive” column of the Sina Weibo “Sino-US Trade Warfare” keyword search page, covering the media news summary. , hot reviews, opinions expressed by experts and scholars, blog posts published by netizens, and opinions expressed by Weibo users when they forward news and comments. 2 In the specific crawling process, first use the requests to request data from the website, get the html of the webpage, use the BeautifulSoup to parse the webpage html (parse), and then find the key (key) where the microblog body is located in the webpage, extract it, Key values to get text data. 3Remove irrelevant content in the original text (such as "@", "weibo", web link, "reply", "network link" and various special symbols) #### Data Format All files are packaged in zip All raw data is a txt text file UTF-8 encoding The single-day data naming format is result2018-mm-dd -- 2018-mm-dd.txt All data is summarized into result_all.txt #### How to use The computer program reads into memory for analysis. #### Data Description During the period from 2018-04-01 to 2018-09-30, the “China-US Trade War” is the microblog blog data under the “Comprehensive” column in the keyword search results, which is automatically crawled by computer programs. The data format is txt and the encoding is utf-8. DataDescription Weibo data about the trade war between CHINA and US. Time range: 2018-04-01----2018-09-30. Data Format: txt. Encoding: utf-8. ##### If necessary, you can contact us through emai. Whulavender@163.com
本文档涵盖内容包括:数据源、采集与处理方法、数据格式及使用方式;数据说明。作者:j;完成日期:2019年3月17日
#### 数据源
新浪微博官方网站(www.weibo.com)
#### 采集与处理方法
1. 使用Python语言编写爬虫程序,调用新浪微博搜索功能,抓取2018年4月至9月期间,新浪微博“中美贸易战”关键词搜索页面“综合”栏目下的全部博文,内容涵盖媒体新闻摘要、热门评论、专家学者观点、网民发布的博文,以及微博用户转发新闻与评论时表达的观点。
2. 具体采集流程为:先通过requests库向目标网站发起数据请求,获取网页HTML源码;随后使用BeautifulSoup库解析网页HTML,定位网页中微博正文所在的键(key)并提取其键值,由此得到文本数据。
3. 移除原文中的无关内容,包括“@”符号、“weibo”字样、网页链接、“回复”及各类特殊符号。
#### 数据格式
所有文件以ZIP格式打包;原始数据均为UTF-8编码的TXT文本文件;单日数据命名格式为result2018-mm-dd--2018-mm-dd.txt;所有数据汇总为result_all.txt。
#### 使用方式
将数据读入计算机内存以开展分析工作。
#### 数据说明
2018年4月1日至2018年9月30日期间,以“中美贸易战”为关键词的新浪微博搜索结果“综合”栏目下的博文数据,由计算机程序自动抓取。本数据集为围绕中美贸易战的微博数据,时间范围:2018-04-01至2018-09-30;数据格式:TXT;编码:UTF-8。
如有必要,可通过邮箱Whulavender@163.com联系我方。
提供机构:
Peking University Open Research Data Platform
创建时间:
2019-08-28
搜集汇总
数据集介绍

背景与挑战
背景概述
该数据集是基于新浪微博爬取的关于中美贸易战的公开文本数据,涵盖2018年4月至9月期间的关键词搜索博文,包括媒体摘要、热评和网民观点等内容。数据以txt格式存储,经过清洗处理,适用于社会科学领域的情感分析研究,具有明确的时间范围和较高的可用性。
以上内容由遇见数据集搜集并总结生成



