Python爬取数据并写入MySQL数据库

首先咱们来爬取 http://html-color-codes.info/color-names/ 的一些数据。html 按 F12 或 ctrl+u 审查元素,结果以下:python   结构很清晰简单,咱们就是要爬 tr 标签里面的 style 和 tr 下几个并列的 td 标签,下面是爬取的代码:mysql #!/usr/bin/env python # coding=utf-8 impo
相关文章
相关标签/搜索