本文整理汇总了Python中DBManager.DBManager.create_tables方法的典型用法代码示例。如果您正苦于以下问题:Python DBManager.create_tables方法的具体用法?Python DBManager.create_tables怎么用?Python DBManager.create_tables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.create_tables方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: namotoring_thread_grab
# 需要导入模块: from DBManager import DBManager [as 别名]
# 或者: from DBManager.DBManager import create_tables [as 别名]
if not debug:
udb.insert_into_table(threaddb, threaddata)
else:
print threaddata
namotoring_thread_grab(j.xpath(bmw.link)[0])
for k in threads:
pass
# print k
if next:
next_page = xmlTree(next)
elif not next:
break
if not debug:
udb.close()
namotoring_u = 'http://www.northamericanmotoring.com/forums/members/1279-dave.html'
namotoring_thrd = 'http://www.northamericanmotoring.com/forums/mini-collectibles/35159-post-your-finds-here.html'
threads = Fields(thread_table_fields, 'threads')
posts = Fields(posts_table_fields, 'posts')
users = Fields(user_table_fields, 'users')
if __name__=='__main__':
#nam = namotoring()
#namotoring_thread_grab(namotoring_thrd)
#namotoring_user_grab(namotoring_u)
dbf = DBManager()
dbf.create_tables('namotoring', 'users', users)
dbf.create_tables('namotoring', 'threads', threads)
dbf.create_tables('namotoring', 'posts', posts)
#namotoring_user_grab(namotoring_u)
#namotoring_thread_grab(namotoring_thrd)
namotoring_grab(debug=False)
示例2: priuschat_thread_grab
# 需要导入模块: from DBManager import DBManager [as 别名]
# 或者: from DBManager.DBManager import create_tables [as 别名]
#print bmw.thread_id(j.xpath(bmw.link)[0])
if not debug:
udb.insert_into_table(threaddb, threaddata)
else:
print threaddata
priuschat_thread_grab(j.xpath(bmw.link)[0])
for k in threads:
pass
# print k
if next:
next_page = xmlTree(next+allmosttime)
elif not next:
break
if not debug:
udb.close()
priuschat_u = 'http://priuschat.com/forums/members/dva.html'
priuschat_thrd = 'http://priuschat.com/forums/prius-hybrid-news/88002-prius-v-wagon-puzzle-finally-complete-heres-what-we-know.html'
threads = Fields(thread_table_fields, 'threads')
posts = Fields(posts_table_fields, 'posts')
users = Fields(user_table_fields, 'users')
if __name__=='__main__':
#prius = priuschat()
#priuschat_thread_grab(priuschat_thrd)
dbf = DBManager()
dbf.create_tables('priuschat', 'users', users)
dbf.create_tables('priuschat', 'threads', threads)
dbf.create_tables('priuschat', 'posts', posts)
#priuschat_user_grab(priuschat_u)
priuschat_thread_grab(priuschat_thrd)
#priuschat_grab(debug=False)
示例3: DBManager
# 需要导入模块: from DBManager import DBManager [as 别名]
# 或者: from DBManager.DBManager import create_tables [as 别名]
#user_list = [bimmer_user,audiworld_u,e90post_u, priuschat_u, feoa_u, mazda3_u, vwvortex_u]
if __name__=="__main__":
dbf = DBManager()
dbf.create_tables('audiworld', 'users', users)
dbf.create_tables('audiworld', 'threads', threads)
dbf.create_tables('audiworld', 'posts', posts)
#bimmerfest_thread_grab(bimmerg)
# for t in range(200):
# bimmerfest_user_grab(bimmer_user)
#bimmerfest_user_grab(bimmer_user)
#e90post_user_grab(e90post_u)
#priuschat_user_grab(priuschat_u)
#mazda3_user_grab(user_list[5])
#bimmerfest_thread_grab(bimmerfest_thrd)