... import requests from bs4 import BeautifulSoup import os import sys class mzitu(): def html(self, href): html = self.request(href) a = BeautifulSoup(html.text, 'lxml').find('h2', class_='main-title') title = a.get_text() print(u'开始保存:', title) pat…
这是晚上没事无聊写的python爬虫小程序,专门爬取妹子图的,养眼用的,嘻嘻!身为程序狗只会这个了! 废话不多说,代码附上,仅供参考学习! """ 功能:爬取妹子图全网妹子图片,可以选择爬取年份,自动分类保存 作者:68喜科技 """ import requests from lxml import etree # import re import os # from time import sleep class Meizitu(object)…
Python 爬取所有51VOA网站的Learn a words文本及mp3音频 #!/usr/bin/env python # -*- coding: utf-8 -*- #Python 爬取所有51VOA网站的Learn a words文本及mp3音频 import os import sys import time import urllib as req from threading import Thread import urllib2 import urllib from thre…
python 爬取历史天气 官网:http://lishi.tianqi.com/luozhuangqu/201802.html # encoding:utf-8 import requests from bs4 import BeautifulSoup import pymysql import pandas as pd date_list = [x.strftime('%Y%m') for x in list(pd.date_range(start='2016-09', end='2018-…