Skip to content

Commit

Permalink
Update db.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ysh329 committed Oct 16, 2016
1 parent 0563ab8 commit c184f2f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spider/db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
################################### PART0 DESCRIPTION #################################
# Filename: db.py
# Description:
#

# E-mail: ysh329@sina.com
# Create: 2016-08-28 23:09:25
# Last:
__author__ = 'yuens'


################################### PART1 IMPORT ######################################


import peewee

databaseName = "DouBan"
hostName = "localhost"
password = "931209"
userName = 'root'
portCode = 3306



#database = peewee.MySQLDatabase('web_db', **{'host': 'localhost', 'password': 'kkd93kd ', 'port': 3306, 'user': 'root'})
database = peewee.MySQLDatabase(database=databaseName,**{'host': hostName, 'password': password, 'port': portCode, 'user': userName})

0 comments on commit c184f2f

Please sign in to comment.