Owing to the continuous variant of the COVID-19 virus, the present epidemic may persist for a long time, and each breakout displays strongly region/time-dependent characteristics. Predicting each specific burst is the basic task for the corresponding strategies. However, the refinement of prevention and control measures usually means the limitation of the existing records of the evolution of the spread, which leads to a special difficulty in making predictions. Taking into account the interdependence of people’s travel behaviors and the epidemic spreading, we propose a modified logistic model to mimic the COVID-19 epidemic spreading, in order to predict the evolutionary behaviors for a specific bursting in a megacity with limited epidemic related records. It continuously reproduced the COVID-19 infected records in Shanghai, China in the period from March 1 to June 28, 2022. From December 7, 2022 when Mainland China adopted new detailed prevention and control measures, the COVID-19 epidemic broke out nationwide, and the infected people themselves took “ibuprofen” widely to relieve the symptoms of fever. A reasonable assumption is that the total number of searches for the word “ibuprofen” is a good representation of the number of infected people. By using the number of searching for the word “ibuprofen” provided on Baidu, a famous searching platform in Mainland China, we estimate the parameters in the modified logistic model and predict subsequently the epidemic spreading behavior in Shanghai, China starting from December 1, 2022. This situation lasted for 72 days. The number of the infected people increased exponentially in the period from the beginning to the 24th day, reached a summit on the 31st day, and decreased exponentially in the period from the 38th day to the end. Within the two weeks centered at the summit, the increasing and decreasing speeds are both significantly small, but the increased number of infected people each day was significantly large. The characteristic for this prediction matches very well with that for the number of metro passengers in Shanghai. It is suggested that the relevant departments should establish a monitoring system composed of some communities, hospitals, etc. according to the sampling principle in statistics to provide reliable prediction records for researchers.