1.MongoDB.py import pymongo from pymongo.collection import Collection client = pymongo.MongoClient(host='192.168.54.41',port=27017) db = client['douyin'] def send_task(): with open('douyin_hot_id.txt','r') as f: f_read = f.readlines() for i in f_read…
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-…