#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from spider.DBUtil import *
from pojo.TFundSummary import *
from pojo.TWebsiteInfo import *
from spider.Sipder import Spider
import demjson
import json
import time

class FundDataSpider2(Spider):
    def __init__(self):
        pass

    def addFundInfo(self):
        urlList = [
                    'http://fund.eastmoney.com/006048.html',
                    'http://fund.eastmoney.com/006131.html',
                    'http://fund.eastmoney.com/006262.html',
                    'http://fund.eastmoney.com/006355.html',
                    'http://fund.eastmoney.com/160724.html',
                    'http://fund.eastmoney.com/160725.html']
        
        urlDict = {'http://fund.eastmoney.com/000008.html':'000008',
                    'http://fund.eastmoney.com/000042.html':'000042',
                    'http://fund.eastmoney.com/000051.html':'000051',
                    'http://fund.eastmoney.com/000059.html':'000059',
                    'http://fund.eastmoney.com/000087.html':'000087',
                    'http://fund.eastmoney.com/000088.html':'000088',
                    'http://fund.eastmoney.com/000176.html':'000176',
                    'http://fund.eastmoney.com/000216.html':'000216',
                    'http://fund.eastmoney.com/000217.html':'000217',
                    'http://fund.eastmoney.com/000218.html':'000218',
                    'http://fund.eastmoney.com/000248.html':'000248',
                    'http://fund.eastmoney.com/000307.html':'000307',
                    'http://fund.eastmoney.com/000311.html':'000311',
                    'http://fund.eastmoney.com/000312.html':'000312',
                    'http://fund.eastmoney.com/000313.html':'000313',
                    'http://fund.eastmoney.com/000368.html':'000368',
                    'http://fund.eastmoney.com/000373.html':'000373',
                    'http://fund.eastmoney.com/000376.html':'000376',
                    'http://fund.eastmoney.com/000478.html':'000478',
                    'http://fund.eastmoney.com/000596.html':'000596',
                    'http://fund.eastmoney.com/000613.html':'000613',
                    'http://fund.eastmoney.com/000656.html':'000656',
                    'http://fund.eastmoney.com/000826.html':'000826',
                    'http://fund.eastmoney.com/000827.html':'000827',
                    'http://fund.eastmoney.com/000835.html':'000835',
                    'http://fund.eastmoney.com/000929.html':'000929',
                    'http://fund.eastmoney.com/000930.html':'000930',
                    'http://fund.eastmoney.com/000942.html':'000942',
                    'http://fund.eastmoney.com/000950.html':'000950',
                    'http://fund.eastmoney.com/000961.html':'000961',
                    'http://fund.eastmoney.com/000962.html':'000962',
                    'http://fund.eastmoney.com/000968.html':'000968',
                    'http://fund.eastmoney.com/000975.html':'000975',
                    'http://fund.eastmoney.com/001015.html':'001015',
                    'http://fund.eastmoney.com/001016.html':'001016',
                    'http://fund.eastmoney.com/001021.html':'001021',
                    'http://fund.eastmoney.com/001023.html':'001023',
                    'http://fund.eastmoney.com/001027.html':'001027',
                    'http://fund.eastmoney.com/001051.html':'001051',
                    'http://fund.eastmoney.com/001052.html':'001052',
                    'http://fund.eastmoney.com/001064.html':'001064',
                    'http://fund.eastmoney.com/001113.html':'001113',
                    'http://fund.eastmoney.com/001133.html':'001133',
                    'http://fund.eastmoney.com/001149.html':'001149',
                    'http://fund.eastmoney.com/001180.html':'001180',
                    'http://fund.eastmoney.com/001214.html':'001214',
                    'http://fund.eastmoney.com/001237.html':'001237',
                    'http://fund.eastmoney.com/001241.html':'001241',
                    'http://fund.eastmoney.com/001242.html':'001242',
                    'http://fund.eastmoney.com/001243.html':'001243',
                    'http://fund.eastmoney.com/001344.html':'001344',
                    'http://fund.eastmoney.com/001351.html':'001351',
                    'http://fund.eastmoney.com/001361.html':'001361',
                    'http://fund.eastmoney.com/001397.html':'001397',
                    'http://fund.eastmoney.com/001420.html':'001420',
                    'http://fund.eastmoney.com/001426.html':'001426',
                    'http://fund.eastmoney.com/001455.html':'001455',
                    'http://fund.eastmoney.com/001469.html':'001469',
                    'http://fund.eastmoney.com/001512.html':'001512',
                    'http://fund.eastmoney.com/001539.html':'001539',
                    'http://fund.eastmoney.com/001548.html':'001548',
                    'http://fund.eastmoney.com/001549.html':'001549',
                    'http://fund.eastmoney.com/001550.html':'001550',
                    'http://fund.eastmoney.com/001551.html':'001551',
                    'http://fund.eastmoney.com/001552.html':'001552',
                    'http://fund.eastmoney.com/001553.html':'001553',
                    'http://fund.eastmoney.com/001588.html':'001588',
                    'http://fund.eastmoney.com/001589.html':'001589',
                    'http://fund.eastmoney.com/001592.html':'001592',
                    'http://fund.eastmoney.com/001593.html':'001593',
                    'http://fund.eastmoney.com/001594.html':'001594',
                    'http://fund.eastmoney.com/001595.html':'001595',
                    'http://fund.eastmoney.com/001617.html':'001617',
                    'http://fund.eastmoney.com/001618.html':'001618',
                    'http://fund.eastmoney.com/001629.html':'001629',
                    'http://fund.eastmoney.com/001630.html':'001630',
                    'http://fund.eastmoney.com/001631.html':'001631',
                    'http://fund.eastmoney.com/001632.html':'001632',
                    'http://fund.eastmoney.com/001713.html':'001713',
                    'http://fund.eastmoney.com/001884.html':'001884',
                    'http://fund.eastmoney.com/001899.html':'001899',
                    'http://fund.eastmoney.com/002199.html':'002199',
                    'http://fund.eastmoney.com/002236.html':'002236',
                    'http://fund.eastmoney.com/002310.html':'002310',
                    'http://fund.eastmoney.com/002311.html':'002311',
                    'http://fund.eastmoney.com/002315.html':'002315',
                    'http://fund.eastmoney.com/002316.html':'002316',
                    'http://fund.eastmoney.com/002385.html':'002385',
                    'http://fund.eastmoney.com/002510.html':'002510',
                    'http://fund.eastmoney.com/002588.html':'002588',
                    'http://fund.eastmoney.com/002610.html':'002610',
                    'http://fund.eastmoney.com/002611.html':'002611',
                    'http://fund.eastmoney.com/002656.html':'002656',
                    'http://fund.eastmoney.com/002670.html':'002670',
                    'http://fund.eastmoney.com/002671.html':'002671',
                    'http://fund.eastmoney.com/002900.html':'002900',
                    'http://fund.eastmoney.com/002903.html':'002903',
                    'http://fund.eastmoney.com/002906.html':'002906',
                    'http://fund.eastmoney.com/002907.html':'002907',
                    'http://fund.eastmoney.com/002963.html':'002963',
                    'http://fund.eastmoney.com/002974.html':'002974',
                    'http://fund.eastmoney.com/002977.html':'002977',
                    'http://fund.eastmoney.com/002978.html':'002978',
                    'http://fund.eastmoney.com/002979.html':'002979',
                    'http://fund.eastmoney.com/002982.html':'002982',
                    'http://fund.eastmoney.com/002984.html':'002984',
                    'http://fund.eastmoney.com/002987.html':'002987',
                    'http://fund.eastmoney.com/003015.html':'003015',
                    'http://fund.eastmoney.com/003016.html':'003016',
                    'http://fund.eastmoney.com/003017.html':'003017',
                    'http://fund.eastmoney.com/003079.html':'003079',
                    'http://fund.eastmoney.com/003080.html':'003080',
                    'http://fund.eastmoney.com/003081.html':'003081',
                    'http://fund.eastmoney.com/003082.html':'003082',
                    'http://fund.eastmoney.com/003083.html':'003083',
                    'http://fund.eastmoney.com/003084.html':'003084',
                    'http://fund.eastmoney.com/003085.html':'003085',
                    'http://fund.eastmoney.com/003086.html':'003086',
                    'http://fund.eastmoney.com/003184.html':'003184',
                    'http://fund.eastmoney.com/003194.html':'003194',
                    'http://fund.eastmoney.com/003261.html':'003261',
                    'http://fund.eastmoney.com/003262.html':'003262',
                    'http://fund.eastmoney.com/003318.html':'003318',
                    'http://fund.eastmoney.com/003358.html':'003358',
                    'http://fund.eastmoney.com/003359.html':'003359',
                    'http://fund.eastmoney.com/003366.html':'003366',
                    'http://fund.eastmoney.com/003376.html':'003376',
                    'http://fund.eastmoney.com/003377.html':'003377',
                    'http://fund.eastmoney.com/003429.html':'003429',
                    'http://fund.eastmoney.com/003475.html':'003475',
                    'http://fund.eastmoney.com/003524.html':'003524',
                    'http://fund.eastmoney.com/003548.html':'003548',
                    'http://fund.eastmoney.com/003578.html':'003578',
                    'http://fund.eastmoney.com/003579.html':'003579',
                    'http://fund.eastmoney.com/003646.html':'003646',
                    'http://fund.eastmoney.com/003647.html':'003647',
                    'http://fund.eastmoney.com/003702.html':'003702',
                    'http://fund.eastmoney.com/003765.html':'003765',
                    'http://fund.eastmoney.com/003766.html':'003766',
                    'http://fund.eastmoney.com/003814.html':'003814',
                    'http://fund.eastmoney.com/003815.html':'003815',
                    'http://fund.eastmoney.com/003817.html':'003817',
                    'http://fund.eastmoney.com/003818.html':'003818',
                    'http://fund.eastmoney.com/003876.html':'003876',
                    'http://fund.eastmoney.com/003884.html':'003884',
                    'http://fund.eastmoney.com/003885.html':'003885',
                    'http://fund.eastmoney.com/003932.html':'003932',
                    'http://fund.eastmoney.com/003933.html':'003933',
                    'http://fund.eastmoney.com/003934.html':'003934',
                    'http://fund.eastmoney.com/003935.html':'003935',
                    'http://fund.eastmoney.com/003986.html':'003986',
                    'http://fund.eastmoney.com/003987.html':'003987',
                    'http://fund.eastmoney.com/003988.html':'003988',
                    'http://fund.eastmoney.com/003989.html':'003989',
                    'http://fund.eastmoney.com/003990.html':'003990',
                    'http://fund.eastmoney.com/003995.html':'003995',
                    'http://fund.eastmoney.com/003996.html':'003996',
                    'http://fund.eastmoney.com/004069.html':'004069',
                    'http://fund.eastmoney.com/004070.html':'004070',
                    'http://fund.eastmoney.com/004085.html':'004085',
                    'http://fund.eastmoney.com/004086.html':'004086',
                    'http://fund.eastmoney.com/004190.html':'004190',
                    'http://fund.eastmoney.com/004191.html':'004191',
                    'http://fund.eastmoney.com/004192.html':'004192',
                    'http://fund.eastmoney.com/004193.html':'004193',
                    'http://fund.eastmoney.com/004194.html':'004194',
                    'http://fund.eastmoney.com/004195.html':'004195',
                    'http://fund.eastmoney.com/004253.html':'004253',
                    'http://fund.eastmoney.com/004342.html':'004342',
                    'http://fund.eastmoney.com/004343.html':'004343',
                    'http://fund.eastmoney.com/004344.html':'004344',
                    'http://fund.eastmoney.com/004345.html':'004345',
                    'http://fund.eastmoney.com/004346.html':'004346',
                    'http://fund.eastmoney.com/004347.html':'004347',
                    'http://fund.eastmoney.com/004348.html':'004348',
                    'http://fund.eastmoney.com/004354.html':'004354',
                    'http://fund.eastmoney.com/004407.html':'004407',
                    'http://fund.eastmoney.com/004408.html':'004408',
                    'http://fund.eastmoney.com/004409.html':'004409',
                    'http://fund.eastmoney.com/004410.html':'004410',
                    'http://fund.eastmoney.com/004416.html':'004416',
                    'http://fund.eastmoney.com/004432.html':'004432',
                    'http://fund.eastmoney.com/004433.html':'004433',
                    'http://fund.eastmoney.com/004488.html':'004488',
                    'http://fund.eastmoney.com/004532.html':'004532',
                    'http://fund.eastmoney.com/004533.html':'004533',
                    'http://fund.eastmoney.com/004593.html':'004593',
                    'http://fund.eastmoney.com/004597.html':'004597',
                    'http://fund.eastmoney.com/004598.html':'004598',
                    'http://fund.eastmoney.com/004642.html':'004642',
                    'http://fund.eastmoney.com/004643.html':'004643',
                    'http://fund.eastmoney.com/004742.html':'004742',
                    'http://fund.eastmoney.com/004743.html':'004743',
                    'http://fund.eastmoney.com/004744.html':'004744',
                    'http://fund.eastmoney.com/004746.html':'004746',
                    'http://fund.eastmoney.com/004752.html':'004752',
                    'http://fund.eastmoney.com/004753.html':'004753',
                    'http://fund.eastmoney.com/004854.html':'004854',
                    'http://fund.eastmoney.com/004855.html':'004855',
                    'http://fund.eastmoney.com/004856.html':'004856',
                    'http://fund.eastmoney.com/004857.html':'004857',
                    'http://fund.eastmoney.com/004870.html':'004870',
                    'http://fund.eastmoney.com/004874.html':'004874',
                    'http://fund.eastmoney.com/004875.html':'004875',
                    'http://fund.eastmoney.com/004876.html':'004876',
                    'http://fund.eastmoney.com/004945.html':'004945',
                    'http://fund.eastmoney.com/004996.html':'004996',
                    'http://fund.eastmoney.com/005051.html':'005051',
                    'http://fund.eastmoney.com/005052.html':'005052',
                    'http://fund.eastmoney.com/005062.html':'005062',
                    'http://fund.eastmoney.com/005063.html':'005063',
                    'http://fund.eastmoney.com/005064.html':'005064',
                    'http://fund.eastmoney.com/005093.html':'005093',
                    'http://fund.eastmoney.com/005112.html':'005112',
                    'http://fund.eastmoney.com/005113.html':'005113',
                    'http://fund.eastmoney.com/005114.html':'005114',
                    'http://fund.eastmoney.com/005125.html':'005125',
                    'http://fund.eastmoney.com/005152.html':'005152',
                    'http://fund.eastmoney.com/005183.html':'005183',
                    'http://fund.eastmoney.com/005223.html':'005223',
                    'http://fund.eastmoney.com/005224.html':'005224',
                    'http://fund.eastmoney.com/005229.html':'005229',
                    'http://fund.eastmoney.com/005279.html':'005279',
                    'http://fund.eastmoney.com/005285.html':'005285',
                    'http://fund.eastmoney.com/005287.html':'005287',
                    'http://fund.eastmoney.com/005288.html':'005288',
                    'http://fund.eastmoney.com/005339.html':'005339',
                    'http://fund.eastmoney.com/005390.html':'005390',
                    'http://fund.eastmoney.com/005391.html':'005391',
                    'http://fund.eastmoney.com/005414.html':'005414',
                    'http://fund.eastmoney.com/005415.html':'005415',
                    'http://fund.eastmoney.com/005554.html':'005554',
                    'http://fund.eastmoney.com/005555.html':'005555',
                    'http://fund.eastmoney.com/005561.html':'005561',
                    'http://fund.eastmoney.com/005562.html':'005562',
                    'http://fund.eastmoney.com/005563.html':'005563',
                    'http://fund.eastmoney.com/005564.html':'005564',
                    'http://fund.eastmoney.com/005565.html':'005565',
                    'http://fund.eastmoney.com/005566.html':'005566',
                    'http://fund.eastmoney.com/005567.html':'005567',
                    'http://fund.eastmoney.com/005568.html':'005568',
                    'http://fund.eastmoney.com/005581.html':'005581',
                    'http://fund.eastmoney.com/005582.html':'005582',
                    'http://fund.eastmoney.com/005607.html':'005607',
                    'http://fund.eastmoney.com/005608.html':'005608',
                    'http://fund.eastmoney.com/005623.html':'005623',
                    'http://fund.eastmoney.com/005624.html':'005624',
                    'http://fund.eastmoney.com/005633.html':'005633',
                    'http://fund.eastmoney.com/005639.html':'005639',
                    'http://fund.eastmoney.com/005640.html':'005640',
                    'http://fund.eastmoney.com/005658.html':'005658',
                    'http://fund.eastmoney.com/005691.html':'005691',
                    'http://fund.eastmoney.com/005692.html':'005692',
                    'http://fund.eastmoney.com/005693.html':'005693',
                    'http://fund.eastmoney.com/005702.html':'005702',
                    'http://fund.eastmoney.com/005727.html':'005727',
                    'http://fund.eastmoney.com/005733.html':'005733',
                    'http://fund.eastmoney.com/005735.html':'005735',
                    'http://fund.eastmoney.com/005737.html':'005737',
                    'http://fund.eastmoney.com/005761.html':'005761',
                    'http://fund.eastmoney.com/005762.html':'005762',
                    'http://fund.eastmoney.com/005788.html':'005788',
                    'http://fund.eastmoney.com/005789.html':'005789',
                    'http://fund.eastmoney.com/005795.html':'005795',
                    'http://fund.eastmoney.com/005803.html':'005803',
                    'http://fund.eastmoney.com/005804.html':'005804',
                    'http://fund.eastmoney.com/005807.html':'005807',
                    'http://fund.eastmoney.com/005808.html':'005808',
                    'http://fund.eastmoney.com/005813.html':'005813',
                    'http://fund.eastmoney.com/005814.html':'005814',
                    'http://fund.eastmoney.com/005829.html':'005829',
                    'http://fund.eastmoney.com/005830.html':'005830',
                    'http://fund.eastmoney.com/005832.html':'005832',
                    'http://fund.eastmoney.com/005867.html':'005867',
                    'http://fund.eastmoney.com/005868.html':'005868',
                    'http://fund.eastmoney.com/005869.html':'005869',
                    'http://fund.eastmoney.com/005870.html':'005870',
                    'http://fund.eastmoney.com/005873.html':'005873',
                    'http://fund.eastmoney.com/005874.html':'005874',
                    'http://fund.eastmoney.com/005918.html':'005918',
                    'http://fund.eastmoney.com/005919.html':'005919',
                    'http://fund.eastmoney.com/005994.html':'005994',
                    'http://fund.eastmoney.com/005998.html':'005998',
                    'http://fund.eastmoney.com/005999.html':'005999',
                    'http://fund.eastmoney.com/006020.html':'006020',
                    'http://fund.eastmoney.com/006021.html':'006021',
                    'http://fund.eastmoney.com/006048.html':'006048',
                    'http://fund.eastmoney.com/006063.html':'006063',
                    'http://fund.eastmoney.com/006087.html':'006087',
                    'http://fund.eastmoney.com/006098.html':'006098',
                    'http://fund.eastmoney.com/006131.html':'006131',
                    'http://fund.eastmoney.com/006248.html':'006248',
                    'http://fund.eastmoney.com/006249.html':'006249',
                    'http://fund.eastmoney.com/006262.html':'006262',
                    'http://fund.eastmoney.com/006355.html':'006355',
                    'http://fund.eastmoney.com/020011.html':'020011',
                    'http://fund.eastmoney.com/020021.html':'020021',
                    'http://fund.eastmoney.com/020035.html':'020035',
                    'http://fund.eastmoney.com/020036.html':'020036',
                    'http://fund.eastmoney.com/040002.html':'040002',
                    'http://fund.eastmoney.com/040180.html':'040180',
                    'http://fund.eastmoney.com/040190.html':'040190',
                    'http://fund.eastmoney.com/050002.html':'050002',
                    'http://fund.eastmoney.com/050013.html':'050013',
                    'http://fund.eastmoney.com/050021.html':'050021',
                    'http://fund.eastmoney.com/050024.html':'050024',
                    'http://fund.eastmoney.com/070023.html':'070023',
                    'http://fund.eastmoney.com/070030.html':'070030',
                    'http://fund.eastmoney.com/090010.html':'090010',
                    'http://fund.eastmoney.com/090012.html':'090012',
                    'http://fund.eastmoney.com/100032.html':'100032',
                    'http://fund.eastmoney.com/100038.html':'100038',
                    'http://fund.eastmoney.com/100053.html':'100053',
                    'http://fund.eastmoney.com/110003.html':'110003',
                    'http://fund.eastmoney.com/110019.html':'110019',
                    'http://fund.eastmoney.com/110020.html':'110020',
                    'http://fund.eastmoney.com/110021.html':'110021',
                    'http://fund.eastmoney.com/110026.html':'110026',
                    'http://fund.eastmoney.com/110030.html':'110030',
                    'http://fund.eastmoney.com/160119.html':'160119',
                    'http://fund.eastmoney.com/160123.html':'160123',
                    'http://fund.eastmoney.com/160124.html':'160124',
                    'http://fund.eastmoney.com/160135.html':'160135',
                    'http://fund.eastmoney.com/160136.html':'160136',
                    'http://fund.eastmoney.com/160137.html':'160137',
                    'http://fund.eastmoney.com/160218.html':'160218',
                    'http://fund.eastmoney.com/160219.html':'160219',
                    'http://fund.eastmoney.com/160221.html':'160221',
                    'http://fund.eastmoney.com/160222.html':'160222',
                    'http://fund.eastmoney.com/160223.html':'160223',
                    'http://fund.eastmoney.com/160224.html':'160224',
                    'http://fund.eastmoney.com/160225.html':'160225',
                    'http://fund.eastmoney.com/160415.html':'160415',
                    'http://fund.eastmoney.com/160417.html':'160417',
                    'http://fund.eastmoney.com/160418.html':'160418',
                    'http://fund.eastmoney.com/160419.html':'160419',
                    'http://fund.eastmoney.com/160420.html':'160420',
                    'http://fund.eastmoney.com/160422.html':'160422',
                    'http://fund.eastmoney.com/160516.html':'160516',
                    'http://fund.eastmoney.com/160517.html':'160517',
                    'http://fund.eastmoney.com/160615.html':'160615',
                    'http://fund.eastmoney.com/160616.html':'160616',
                    'http://fund.eastmoney.com/160620.html':'160620',
                    'http://fund.eastmoney.com/160625.html':'160625',
                    'http://fund.eastmoney.com/160626.html':'160626',
                    'http://fund.eastmoney.com/160628.html':'160628',
                    'http://fund.eastmoney.com/160629.html':'160629',
                    'http://fund.eastmoney.com/160630.html':'160630',
                    'http://fund.eastmoney.com/160631.html':'160631',
                    'http://fund.eastmoney.com/160632.html':'160632',
                    'http://fund.eastmoney.com/160633.html':'160633',
                    'http://fund.eastmoney.com/160634.html':'160634',
                    'http://fund.eastmoney.com/160635.html':'160635',
                    'http://fund.eastmoney.com/160636.html':'160636',
                    'http://fund.eastmoney.com/160637.html':'160637',
                    'http://fund.eastmoney.com/160638.html':'160638',
                    'http://fund.eastmoney.com/160639.html':'160639',
                    'http://fund.eastmoney.com/160640.html':'160640',
                    'http://fund.eastmoney.com/160643.html':'160643',
                    'http://fund.eastmoney.com/160706.html':'160706',
                    'http://fund.eastmoney.com/160716.html':'160716',
                    'http://fund.eastmoney.com/160720.html':'160720',
                    'http://fund.eastmoney.com/160721.html':'160721',
                    'http://fund.eastmoney.com/160724.html':'160724',
                    'http://fund.eastmoney.com/160725.html':'160725',
                    'http://fund.eastmoney.com/160806.html':'160806',
                    'http://fund.eastmoney.com/160807.html':'160807',
                    'http://fund.eastmoney.com/160808.html':'160808',
                    'http://fund.eastmoney.com/160814.html':'160814',
                    'http://fund.eastmoney.com/161017.html':'161017',
                    'http://fund.eastmoney.com/161022.html':'161022',
                    'http://fund.eastmoney.com/161024.html':'161024',
                    'http://fund.eastmoney.com/161025.html':'161025',
                    'http://fund.eastmoney.com/161026.html':'161026',
                    'http://fund.eastmoney.com/161027.html':'161027',
                    'http://fund.eastmoney.com/161028.html':'161028',
                    'http://fund.eastmoney.com/161029.html':'161029',
                    'http://fund.eastmoney.com/161030.html':'161030',
                    'http://fund.eastmoney.com/161031.html':'161031',
                    'http://fund.eastmoney.com/161032.html':'161032',
                    'http://fund.eastmoney.com/161033.html':'161033',
                    'http://fund.eastmoney.com/161035.html':'161035',
                    'http://fund.eastmoney.com/161036.html':'161036',
                    'http://fund.eastmoney.com/161037.html':'161037',
                    'http://fund.eastmoney.com/161039.html':'161039',
                    'http://fund.eastmoney.com/161118.html':'161118',
                    'http://fund.eastmoney.com/161119.html':'161119',
                    'http://fund.eastmoney.com/161120.html':'161120',
                    'http://fund.eastmoney.com/161121.html':'161121',
                    'http://fund.eastmoney.com/161122.html':'161122',
                    'http://fund.eastmoney.com/161123.html':'161123',
                    'http://fund.eastmoney.com/161207.html':'161207',
                    'http://fund.eastmoney.com/161211.html':'161211',
                    'http://fund.eastmoney.com/161213.html':'161213',
                    'http://fund.eastmoney.com/161217.html':'161217',
                    'http://fund.eastmoney.com/161223.html':'161223',
                    'http://fund.eastmoney.com/161227.html':'161227',
                    'http://fund.eastmoney.com/161604.html':'161604',
                    'http://fund.eastmoney.com/161607.html':'161607',
                    'http://fund.eastmoney.com/161612.html':'161612',
                    'http://fund.eastmoney.com/161613.html':'161613',
                    'http://fund.eastmoney.com/161628.html':'161628',
                    'http://fund.eastmoney.com/161629.html':'161629',
                    'http://fund.eastmoney.com/161631.html':'161631',
                    'http://fund.eastmoney.com/161715.html':'161715',
                    'http://fund.eastmoney.com/161718.html':'161718',
                    'http://fund.eastmoney.com/161720.html':'161720',
                    'http://fund.eastmoney.com/161721.html':'161721',
                    'http://fund.eastmoney.com/161723.html':'161723',
                    'http://fund.eastmoney.com/161724.html':'161724',
                    'http://fund.eastmoney.com/161725.html':'161725',
                    'http://fund.eastmoney.com/161726.html':'161726',
                    'http://fund.eastmoney.com/161811.html':'161811',
                    'http://fund.eastmoney.com/161812.html':'161812',
                    'http://fund.eastmoney.com/161816.html':'161816',
                    'http://fund.eastmoney.com/161819.html':'161819',
                    'http://fund.eastmoney.com/161825.html':'161825',
                    'http://fund.eastmoney.com/161826.html':'161826',
                    'http://fund.eastmoney.com/161907.html':'161907',
                    'http://fund.eastmoney.com/162213.html':'162213',
                    'http://fund.eastmoney.com/162216.html':'162216',
                    'http://fund.eastmoney.com/162307.html':'162307',
                    'http://fund.eastmoney.com/162412.html':'162412',
                    'http://fund.eastmoney.com/162413.html':'162413',
                    'http://fund.eastmoney.com/162416.html':'162416',
                    'http://fund.eastmoney.com/162509.html':'162509',
                    'http://fund.eastmoney.com/162510.html':'162510',
                    'http://fund.eastmoney.com/162711.html':'162711',
                    'http://fund.eastmoney.com/162714.html':'162714',
                    'http://fund.eastmoney.com/162907.html':'162907',
                    'http://fund.eastmoney.com/163109.html':'163109',
                    'http://fund.eastmoney.com/163111.html':'163111',
                    'http://fund.eastmoney.com/163113.html':'163113',
                    'http://fund.eastmoney.com/163114.html':'163114',
                    'http://fund.eastmoney.com/163115.html':'163115',
                    'http://fund.eastmoney.com/163116.html':'163116',
                    'http://fund.eastmoney.com/163118.html':'163118',
                    'http://fund.eastmoney.com/163119.html':'163119',
                    'http://fund.eastmoney.com/163209.html':'163209',
                    'http://fund.eastmoney.com/163407.html':'163407',
                    'http://fund.eastmoney.com/163808.html':'163808',
                    'http://fund.eastmoney.com/163821.html':'163821',
                    'http://fund.eastmoney.com/164304.html':'164304',
                    'http://fund.eastmoney.com/164401.html':'164401',
                    'http://fund.eastmoney.com/164402.html':'164402',
                    'http://fund.eastmoney.com/164508.html':'164508',
                    'http://fund.eastmoney.com/164809.html':'164809',
                    'http://fund.eastmoney.com/164811.html':'164811',
                    'http://fund.eastmoney.com/164818.html':'164818',
                    'http://fund.eastmoney.com/164819.html':'164819',
                    'http://fund.eastmoney.com/164820.html':'164820',
                    'http://fund.eastmoney.com/164821.html':'164821',
                    'http://fund.eastmoney.com/164825.html':'164825',
                    'http://fund.eastmoney.com/164905.html':'164905',
                    'http://fund.eastmoney.com/164907.html':'164907',
                    'http://fund.eastmoney.com/164908.html':'164908',
                    'http://fund.eastmoney.com/165309.html':'165309',
                    'http://fund.eastmoney.com/165312.html':'165312',
                    'http://fund.eastmoney.com/165511.html':'165511',
                    'http://fund.eastmoney.com/165515.html':'165515',
                    'http://fund.eastmoney.com/165519.html':'165519',
                    'http://fund.eastmoney.com/165520.html':'165520',
                    'http://fund.eastmoney.com/165521.html':'165521',
                    'http://fund.eastmoney.com/165522.html':'165522',
                    'http://fund.eastmoney.com/165523.html':'165523',
                    'http://fund.eastmoney.com/165524.html':'165524',
                    'http://fund.eastmoney.com/165525.html':'165525',
                    'http://fund.eastmoney.com/165707.html':'165707',
                    'http://fund.eastmoney.com/165806.html':'165806',
                    'http://fund.eastmoney.com/165809.html':'165809',
                    'http://fund.eastmoney.com/165810.html':'165810',
                    'http://fund.eastmoney.com/166007.html':'166007',
                    'http://fund.eastmoney.com/166402.html':'166402',
                    'http://fund.eastmoney.com/166802.html':'166802',
                    'http://fund.eastmoney.com/167301.html':'167301',
                    'http://fund.eastmoney.com/167503.html':'167503',
                    'http://fund.eastmoney.com/167601.html':'167601',
                    'http://fund.eastmoney.com/168001.html':'168001',
                    'http://fund.eastmoney.com/168201.html':'168201',
                    'http://fund.eastmoney.com/168203.html':'168203',
                    'http://fund.eastmoney.com/168204.html':'168204',
                    'http://fund.eastmoney.com/168205.html':'168205',
                    'http://fund.eastmoney.com/180003.html':'180003',
                    'http://fund.eastmoney.com/180033.html':'180033',
                    'http://fund.eastmoney.com/200002.html':'200002',
                    'http://fund.eastmoney.com/202015.html':'202015',
                    'http://fund.eastmoney.com/202017.html':'202017',
                    'http://fund.eastmoney.com/202021.html':'202021',
                    'http://fund.eastmoney.com/202025.html':'202025',
                    'http://fund.eastmoney.com/202211.html':'202211',
                    'http://fund.eastmoney.com/206005.html':'206005',
                    'http://fund.eastmoney.com/206010.html':'206010',
                    'http://fund.eastmoney.com/213010.html':'213010',
                    'http://fund.eastmoney.com/217016.html':'217016',
                    'http://fund.eastmoney.com/217017.html':'217017',
                    'http://fund.eastmoney.com/217019.html':'217019',
                    'http://fund.eastmoney.com/217027.html':'217027',
                    'http://fund.eastmoney.com/233010.html':'233010',
                    'http://fund.eastmoney.com/240014.html':'240014',
                    'http://fund.eastmoney.com/240016.html':'240016',
                    'http://fund.eastmoney.com/240019.html':'240019',
                    'http://fund.eastmoney.com/257060.html':'257060',
                    'http://fund.eastmoney.com/270010.html':'270010',
                    'http://fund.eastmoney.com/270026.html':'270026',
                    'http://fund.eastmoney.com/290010.html':'290010',
                    'http://fund.eastmoney.com/310318.html':'310318',
                    'http://fund.eastmoney.com/310398.html':'310398',
                    'http://fund.eastmoney.com/320010.html':'320010',
                    'http://fund.eastmoney.com/320014.html':'320014',
                    'http://fund.eastmoney.com/370023.html':'370023',
                    'http://fund.eastmoney.com/399001.html':'399001',
                    'http://fund.eastmoney.com/410008.html':'410008',
                    'http://fund.eastmoney.com/410010.html':'410010',
                    'http://fund.eastmoney.com/450008.html':'450008',
                    'http://fund.eastmoney.com/460220.html':'460220',
                    'http://fund.eastmoney.com/460300.html':'460300',
                    'http://fund.eastmoney.com/470007.html':'470007',
                    'http://fund.eastmoney.com/470068.html':'470068',
                    'http://fund.eastmoney.com/481009.html':'481009',
                    'http://fund.eastmoney.com/481012.html':'481012',
                    'http://fund.eastmoney.com/501002.html':'501002',
                    'http://fund.eastmoney.com/501005.html':'501005',
                    'http://fund.eastmoney.com/501006.html':'501006',
                    'http://fund.eastmoney.com/501007.html':'501007',
                    'http://fund.eastmoney.com/501008.html':'501008',
                    'http://fund.eastmoney.com/501009.html':'501009',
                    'http://fund.eastmoney.com/501010.html':'501010',
                    'http://fund.eastmoney.com/501011.html':'501011',
                    'http://fund.eastmoney.com/501012.html':'501012',
                    'http://fund.eastmoney.com/501016.html':'501016',
                    'http://fund.eastmoney.com/501019.html':'501019',
                    'http://fund.eastmoney.com/501023.html':'501023',
                    'http://fund.eastmoney.com/501025.html':'501025',
                    'http://fund.eastmoney.com/501029.html':'501029',
                    'http://fund.eastmoney.com/501030.html':'501030',
                    'http://fund.eastmoney.com/501031.html':'501031',
                    'http://fund.eastmoney.com/501036.html':'501036',
                    'http://fund.eastmoney.com/501037.html':'501037',
                    'http://fund.eastmoney.com/501043.html':'501043',
                    'http://fund.eastmoney.com/501045.html':'501045',
                    'http://fund.eastmoney.com/501047.html':'501047',
                    'http://fund.eastmoney.com/501048.html':'501048',
                    'http://fund.eastmoney.com/501050.html':'501050',
                    'http://fund.eastmoney.com/501057.html':'501057',
                    'http://fund.eastmoney.com/501058.html':'501058',
                    'http://fund.eastmoney.com/501059.html':'501059',
                    'http://fund.eastmoney.com/501060.html':'501060',
                    'http://fund.eastmoney.com/501061.html':'501061',
                    'http://fund.eastmoney.com/501101.html':'501101',
                    'http://fund.eastmoney.com/501105.html':'501105',
                    'http://fund.eastmoney.com/501106.html':'501106',
                    'http://fund.eastmoney.com/501301.html':'501301',
                    'http://fund.eastmoney.com/501303.html':'501303',
                    'http://fund.eastmoney.com/501305.html':'501305',
                    'http://fund.eastmoney.com/501306.html':'501306',
                    'http://fund.eastmoney.com/501307.html':'501307',
                    'http://fund.eastmoney.com/501308.html':'501308',
                    'http://fund.eastmoney.com/502000.html':'502000',
                    'http://fund.eastmoney.com/502003.html':'502003',
                    'http://fund.eastmoney.com/502006.html':'502006',
                    'http://fund.eastmoney.com/502010.html':'502010',
                    'http://fund.eastmoney.com/502013.html':'502013',
                    'http://fund.eastmoney.com/502020.html':'502020',
                    'http://fund.eastmoney.com/502023.html':'502023',
                    'http://fund.eastmoney.com/502030.html':'502030',
                    'http://fund.eastmoney.com/502036.html':'502036',
                    'http://fund.eastmoney.com/502040.html':'502040',
                    'http://fund.eastmoney.com/502048.html':'502048',
                    'http://fund.eastmoney.com/502053.html':'502053',
                    'http://fund.eastmoney.com/502056.html':'502056',
                    'http://fund.eastmoney.com/510080.html':'510080',
                    'http://fund.eastmoney.com/519027.html':'519027',
                    'http://fund.eastmoney.com/519032.html':'519032',
                    'http://fund.eastmoney.com/519034.html':'519034',
                    'http://fund.eastmoney.com/519100.html':'519100',
                    'http://fund.eastmoney.com/519116.html':'519116',
                    'http://fund.eastmoney.com/519117.html':'519117',
                    'http://fund.eastmoney.com/519180.html':'519180',
                    'http://fund.eastmoney.com/519300.html':'519300',
                    'http://fund.eastmoney.com/519671.html':'519671',
                    'http://fund.eastmoney.com/519677.html':'519677',
                    'http://fund.eastmoney.com/519686.html':'519686',
                    'http://fund.eastmoney.com/519706.html':'519706',
                    'http://fund.eastmoney.com/519931.html':'519931',
                    'http://fund.eastmoney.com/530010.html':'530010',
                    'http://fund.eastmoney.com/530015.html':'530015',
                    'http://fund.eastmoney.com/530018.html':'530018',
                    'http://fund.eastmoney.com/540012.html':'540012',
                    'http://fund.eastmoney.com/585001.html':'585001',
                    'http://fund.eastmoney.com/590007.html':'590007',
                    'http://fund.eastmoney.com/660008.html':'660008',
                    'http://fund.eastmoney.com/660011.html':'660011',
                    'http://fund.eastmoney.com/690008.html':'690008',
                    'http://fund.eastmoney.com/700002.html':'700002',
                    'http://fund.eastmoney.com/740101.html':'740101'}
        
        regStr=".infoOfFund table tr td"
        #Risk——high        
        for urlInfo in urlList:
            #print(urlDict[urlInfo])            
            html=fundDataSpider.reqPage(urlInfo,'utf-8')        
            paList = fundDataSpider.parsePage(html, regStr)
            
            
            risk1=(paList[0][0].replace('基金类型：','')).split('|')
            risk = ''
            type2 = ''
            if len(risk1) >=2:
                risk=(risk1[1]).replace('  ','')
            
            type2=(risk1[0]).replace('  ','')
            
            guimo=(paList[1][0].replace('基金规模：','')).split('亿元')[0]
            jingli=paList[2][0].replace('基金经理：','')
            chengli=paList[3][0].replace('成 立 日：','')
            companyId = paList[4][0].replace('管 理 人：','')
            pingji=(paList[5][0].replace('基金评级：','')).replace('\n','')
            err = ((paList[6][0]).split("|")[1]).replace('跟踪误差：','').replace(' ','')
            err = err.replace('%','').replace('--','')
            funcode=urlDict[urlInfo]            
            data=(type2,' ',' ',' ',chengli,companyId,pingji,err,funcode)
            print(data)
            dbUtil = DBUtil("127.0.0.1",3306,"root","root","fund","utf-8")
            updateSql = "UPDATE t_fund_summary SET type2= '%s', risk= '%s',fund_scale= %s,fund_manager= '%s',establish_date= '%s',company_name= '%s', grade = '%s',trace_error= '%s' WHERE fund_code = %s"
            dbUtil.update(updateSql, data)
            time.sleep(1)    


if __name__=='__main__':
    fundDataSpider = FundDataSpider2()
    fundDataSpider.addFundInfo();