The publics attitudes play a critical role in the acceptance, purchase, use, and research and development of autonomous vehicles (AVs). To date, the publics attitudes towards AVs were mostly estimated through traditional survey data with high labor costs and a low quantity of samples, which also might be one of the reasons why the influencing factors on the publics attitudes of AVs have not been studied from multiple aspects in a comprehensive way yet. To address the issue, this study aims to propose a method by using large-scale social media data to investigate key factors that affect the publics attitudes and acceptance of AVs. A total of 954,151 Twitter data related to AVs and 53 candidate independent variables from seven categories were extracted using the web scraping method. Then, sentiment analysis was used to measure the public attitudes towards AVs by calculating sentiment scores. Random forests algorithm was employed to preliminarily select candidate independent variables according to their importance, while a linear mixed model was performed to explore the impacting factors considering the unobserved heterogeneities caused by the subjectivity level of tweets. The results showed that the overall attitude of the public on AVs was slightly optimistic. Factors like drunk, blind spot, and mobility had the largest impacts on public attitudes. In addition, people were more likely to express positive feelings when talking about words such as lidar and Tesla that relate to high technologies. Conversely, factors such as COVID-19, pedestrian, sleepy, and highway were found to have significantly negative effects on the publics attitudes. The findings of this study are beneficial for the development of AV technologies, the guidelines for AV-related policy formulation, and the publics understanding and acceptance of AVs.