1. After crawling the webpage, extract the required field information such as customer id, comment time, rating, comment content, taste, environment, service, store ID, etc. from the html page and store it in the MYSQL database.
2. It is found that complete comments are stored in' div' and' main-review', and some page tastes, environments and services are not available on every page, so tryexcept is needed to prevent program interruption.
3, using MYSQL database, python uses pymysql to connect MYSQL data. It is necessary to establish databases and tables first, then connect and define cursors, write corresponding sql statements and execute transactions.