当前位置: 首页>>代码示例>>Python>>正文


Python DBManager.create_tables方法代码示例

本文整理汇总了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)           
开发者ID:hackaway,项目名称:forum,代码行数:33,代码来源:namotoring_grabber.py

示例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)
开发者ID:hackaway,项目名称:forum,代码行数:33,代码来源:priuschat_grabber.py

示例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)
开发者ID:hackaway,项目名称:forum,代码行数:32,代码来源:pyforums.py


注:本文中的DBManager.DBManager.create_tables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。