DoubanBookSpider/DoubanSpider/__init__.py

28 lines
698 B
Python
Raw Normal View History

2019-09-06 18:31:51 +08:00
import os
# 环境检查
try:
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
import requests
import re
import time
import csv
import sqlite3
import logging
2019-09-06 20:01:24 +08:00
import random
2019-09-06 18:31:51 +08:00
except:
print('[System]正在安装支持库...')
os.system('pip install SQLAlchemy')
os.system('pip install sqlite')
os.system('pip install csv')
os.system('pip install requests')
os.system('pip install logging')
import requests
import csv
2019-09-06 19:22:34 +08:00
import logging
2019-09-06 18:31:51 +08:00
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base