當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。