As a major source of information, news media has significant impacts on the stock market investors, and further influence the stock market dynamics. In order to study the effects of online news reports on the Chinese stock market, this paper uses data collected from the Internet, and analyzes through indicators of media attention and media sentiment. After enriching the sentiment corpus, covering positive sentiment, negative sentiment and neutral sentiment, indicators of media attention and media sentiment are constructed. Based on the empirical studies of Shanghai Composite Index during the period from January 1st, 2012 to April 30th, 2016, we find that the media attention and sentiment both affect the stock market. While the sentiment index is a better indicator to capture media sentiments. Although there are various kinds of sources of online news, 52.8% of these sources provide 99.3% of all the related news reports. The results could improve the analysis and prediction of the Chinese stock market, and provide suggestions for investors.