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
相關文章
相關標籤/搜索