獲取豆瓣書摘,存入MongoDB中。 import logging import time import requests from bs4 import BeautifulSoup from pymongo import MongoClient headers = { 'accept': 'text/html,application/xhtml+xml,application/xml