Based on the background of informatization, the development and progress of science and technology has brought an immeasurable impact on the securities market. Therefore, this article uses python technology to crawl the number of individual stock news and study the influence of media attention on investor behavior under the constraint of heterogeneous beliefs. It is found that there is a significant positive correlation between the degree of media attention and the degree of investors’ heterogeneous beliefs, and investors are more likely to choose stocks that are frequently reported by the media; further research has found that media reports intensify the degree of investor’s heterogeneous beliefs, leading to stock transactions. The amount has risen abnormally. Therefore, while enjoying informatization, it is necessary to guard against the risks it bring.