IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Web Perl Discussion :

Récupérer donnée dans fichier texte


Sujet :

Web Perl

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 18
    Points : 10
    Points
    10
    Par défaut Récupérer donnée dans fichier texte
    Bonjour,

    J'ai pris connaissance du post http://www.developpez.net/forums/d32...e-html-parser/ mais je manque de connaissance.

    <title> Parser fichier texte</title>

    <config>Windows XP / Internet Explorer 6.0</config>

    J'ai un fichier txt appelé vigicrue.txt qui ressemble à ceci:



    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    		<meta http-equiv="Pragma" content="no-cache" />
    		<meta http-equiv="Cache-Control" content="no-cache" />
    		<meta http-equiv="Expires" content="0" />
    		<meta name="Description" content="Carte de vigilance crues (prévision des inondations)" /> 
    		<meta name="keywords" content="inondation,alerte,crue,prévision,vigilance" />
    		<meta name="robots" content="index,follow" />
    		<meta name="publisher" content="SCHAPI,MEEDDM" />
    		<!-- Commenté sur le site de pré-production, pour faire la distinction avec le site de production		-->
    		<link rel="icon" type="image/png" href="./image/favicon.png" />
     
    		<title>Vigicrues : Station Vaubarlet</title>
    <!-- script du menu -->
    <script type="text/javascript" src="./script/dynMenu.js"></script>
     <!-- détection du navigateur -->
    <script type="text/javascript" src="./script/browserdetect.js"></script>
    	<script type="text/javascript" language="JavaScript" src="./script/minmax.js"></script>
      <link rel="stylesheet" type="text/css" media="screen" href="./css/style.css"/>
      <link rel="stylesheet" type="text/css" media="screen" href="./css/onglet.css"/>
      <link rel="stylesheet" type="text/css" media="print" href="./css/styleprint.css"/>
    </head>
     
    <body class="fond">
    <a href="http://www.developpement-durable.gouv.fr/" target="_blank"><img src='./imgcss/logoMEDAD.gif' alt="Logo GOUV" width="86" height="98" border="0" 
     
    class="imgbandeau"/></a>
     
    <span class="entete">Vigicrues : Information&nbsp;sur&nbsp;la&nbsp;vigilance&nbsp;"crues"</span>
    <div class="txtscreen">
    <ul id="menu" style="display: none">
    	    <li><a href='./index.php'>Information nationale</a>
          <ul>
                <li><a href='./index.php'>Carte nationale</a></li>
                <li><a href='./index.php#bul_schapi'>Bulletin national</a></li>
    	  </ul>
      </li>
        <li><a href='./niv2.php' target="_self">Informations locales</a>	
            <ul>
    		<li><a href="./niv_spc.php?idspc=16" target="_self">Adour</a></li><li><a href="./niv_spc.php?idspc=11" target="_self">Allier</a></li><li><a 
     
    href="./niv_spc.php?idspc=19" target="_self">Alpes du Nord</a></li><li><a href="./niv_spc.php?idspc=1" target="_self">Artois-Picardie</a></li><li><a 
     
    href="./niv_spc.php?idspc=14" target="_self">Dordogne</a></li><li><a href="./niv_spc.php?idspc=15" target="_self">Garonne</a></li><li><a 
     
    href="./niv_spc.php?idspc=20" target="_self">Grand Delta</a></li><li><a href="./niv_spc.php?idspc=13" target="_self">Littoral Atlantique</a></li><li><a 
     
    href="./niv_spc.php?idspc=10" target="_self">Loire-Cher-Indre</a></li><li><a href="./niv_spc.php?idspc=22" target="_self">Méditerranée 
     
    Est</a></li><li><a href="./niv_spc.php?idspc=21" target="_self">Méditerranée Ouest</a></li><li><a href="./niv_spc.php?idspc=9" 
     
    target="_self">Maine-Loire aval</a></li><li><a href="./niv_spc.php?idspc=2" target="_self">Meuse-Moselle</a></li><li><a href="./niv_spc.php?idspc=5" 
     
    target="_self">Oise-Aisne</a></li><li><a href="./niv_spc.php?idspc=18" target="_self">Rhône amont-Saône</a></li><li><a href="./niv_spc.php?idspc=3" 
     
    target="_self">Rhin-Sarre</a></li><li><a href="./niv_spc.php?idspc=6" target="_self">Seine amont-Marne amont</a></li><li><a href="./niv_spc.php?idspc=4" 
     
    target="_self">Seine aval-Côtiers Normands</a></li><li><a href="./niv_spc.php?idspc=7" target="_self">Seine moyenne-Yonne-Loing</a></li><li><a 
     
    href="./niv_spc.php?idspc=17" target="_self">Tarn-Lot</a></li><li><a href="./niv_spc.php?idspc=12" target="_self">Vienne-Thouet</a></li><li><a 
     
    href="./niv_spc.php?idspc=8" target="_self">Vilaine-Côtiers Bretons</a></li>        </ul>
      </li>
     
    </ul>
    <noscript>
    <p class="ss_titre_clair">Activez le javascript pour mettre en forme le menu...</p>
    <ul class="liennoscript">
    	    <li><a href='./index.php'>Information nationale</a>
          <ul>
                <li><a href='./index.php'>Carte nationale</a></li>
                <li><a href='./index.php#bul_schapi'>Bulletin national</a></li>
    	  </ul>
      </li>
        <li><a href='./niv2.php' target="_self">Informations locales</a>	
            <ul>
    		<li><a href="./niv_spc.php?idspc=16" target="_self">Adour</a></li><li><a href="./niv_spc.php?idspc=11" target="_self">Allier</a></li><li><a 
     
    href="./niv_spc.php?idspc=19" target="_self">Alpes du Nord</a></li><li><a href="./niv_spc.php?idspc=1" target="_self">Artois-Picardie</a></li><li><a 
     
    href="./niv_spc.php?idspc=14" target="_self">Dordogne</a></li><li><a href="./niv_spc.php?idspc=15" target="_self">Garonne</a></li><li><a 
     
    href="./niv_spc.php?idspc=20" target="_self">Grand Delta</a></li><li><a href="./niv_spc.php?idspc=13" target="_self">Littoral Atlantique</a></li><li><a 
     
    href="./niv_spc.php?idspc=10" target="_self">Loire-Cher-Indre</a></li><li><a href="./niv_spc.php?idspc=22" target="_self">Méditerranée 
     
    Est</a></li><li><a href="./niv_spc.php?idspc=21" target="_self">Méditerranée Ouest</a></li><li><a href="./niv_spc.php?idspc=9" 
     
    target="_self">Maine-Loire aval</a></li><li><a href="./niv_spc.php?idspc=2" target="_self">Meuse-Moselle</a></li><li><a href="./niv_spc.php?idspc=5" 
     
    target="_self">Oise-Aisne</a></li><li><a href="./niv_spc.php?idspc=18" target="_self">Rhône amont-Saône</a></li><li><a href="./niv_spc.php?idspc=3" 
     
    target="_self">Rhin-Sarre</a></li><li><a href="./niv_spc.php?idspc=6" target="_self">Seine amont-Marne amont</a></li><li><a href="./niv_spc.php?idspc=4" 
     
    target="_self">Seine aval-Côtiers Normands</a></li><li><a href="./niv_spc.php?idspc=7" target="_self">Seine moyenne-Yonne-Loing</a></li><li><a 
     
    href="./niv_spc.php?idspc=17" target="_self">Tarn-Lot</a></li><li><a href="./niv_spc.php?idspc=12" target="_self">Vienne-Thouet</a></li><li><a 
     
    href="./niv_spc.php?idspc=8" target="_self">Vilaine-Côtiers Bretons</a></li>        </ul>
      </li>
    </ul>
    </noscript>
    </div>
    	<script type="text/javascript" language="Javascript">
        initMenu();
      </script>
    <p class="ariane"><img src="./imgcss/puce_square.png" alt="+" width="12" height="12" /> <a href="./niv2.php">Informations locales</a> &gt; <a 
     
    href="./niv_spc.php?idspc=10">Loire-Cher-Indre</a> &gt; Données temps réel : Vaubarlet</p>
    <div class="titreprint">
    <p>Données temps réel - Vaubarlet</p>
    </div>
    <div id="header">
      <ul>
        	<li><a 
     
    href="./niveau3.php?idstation=446&amp;idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=1"><span>Gra
     
    phique</span></a></li>
        <li id="current"><a 
     
    href="./niveau3.php?idstation=446&amp;idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2"><span>Tab
     
    leau</span></a></li>
        <li><a 
     
    href="./niveau3.php?idstation=446&amp;idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=3"><span>Inf
     
    os station</span></a></li>
      </ul>
    </div>
    <div class="principal_onglets">
        <div class="principal2">
    	  	<div class="haut">
     
    			<div class="coindh"></div>
    		</div>
    <div class="contenu_cadre">
        <p class='titre_cadre'>Vaubarlet (Duni&egrave;res) - Débits en m3/s</p><p>&nbsp;</p><table  class='liste'><tr><th>Date</th><th>Vaubarlet</th></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 08:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 07:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 07:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 06:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 06:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 05:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 05:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 04:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 04:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 03:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 03:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 02:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 02:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 01:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 01:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>11/06/2010 00:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>11/06/2010 00:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 23:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 23:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 22:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 22:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 21:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 21:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 20:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 20:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 19:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 19:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 18:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 18:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 17:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 17:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 16:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 16:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 15:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 15:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 14:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 14:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 13:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 13:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 12:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 12:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 11:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 11:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 10:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 10:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 09:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 09:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 08:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 08:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 07:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 07:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 06:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 06:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 05:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 05:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 04:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 04:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 03:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 03:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 02:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 02:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 01:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 01:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>10/06/2010 00:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>10/06/2010 00:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 23:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 23:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 22:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 22:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 21:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 21:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 20:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 20:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 19:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 19:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 18:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 18:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 17:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 17:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 16:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 16:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 15:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 15:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 14:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 14:00</td><td align='right'>2</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 13:30</td><td align='right'>2</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 13:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 12:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 12:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 11:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 11:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 10:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 10:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 09:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 09:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 08:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 08:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 07:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 07:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 06:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 06:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 05:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 05:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 04:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 04:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 03:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 03:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 02:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 02:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 01:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 01:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>09/06/2010 00:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>09/06/2010 00:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 23:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 23:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 22:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 22:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 21:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 21:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 20:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 20:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 19:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 19:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 18:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 18:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 17:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 17:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 16:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 16:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 15:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 15:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 14:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 14:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 13:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 13:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 12:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 12:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 11:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 11:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 10:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 10:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 09:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 09:00</td><td align='right'>3</td></tr><tr  bgcolor='#F2F2FF'><td>08/06/2010 08:30</td><td align='right'>3</td></tr><tr  
     
    bgcolor='#CCCCFF'><td>08/06/2010 08:00</td><td align='right'>3</td></tr></table><p>&nbsp;</p>
    <div class="txtscreen">
    <form id="form1" name="form1" method="get" action="niveau3.php">
          <input type="hidden" name="idstation" value="446"/>
     
    <table class='formulaire'>
    <tr valign="top"><td><p>Afficher :<br />
          <label>
        <input type="radio" name="typegraphe" value="h" />
    Les hauteurs d'eau</label>
          <br />
          <label>
        <input type="radio" name="typegraphe" value="q"  checked="checked"/>
    Les débits</label>
      </p>
      </td><td>
      <p>
        <label>Afficher les donn&eacute;es sur :&nbsp;&nbsp;&nbsp;</label>
      </p>
      <p>
          <label>
        <input type="radio" name="AffProfondeur" value="24" />
        1 jour</label>
          <br />
          <label>
          <input type="radio" name="AffProfondeur" value="72"  checked="checked"/>
        3 jours</label>
          <br />
          <label>
          <input type="radio" name="AffProfondeur" value="168" />
        7 jours</label>
      </p>
    </td>
    <td rowspan="2"><p>Afficher les stations du tron&ccedil;on (7 max.): </p>
      <p>	  <input type="checkbox" name="tr0" value="456"  /> 1 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=456'>Andrezieu
     
    x-sur-Furan</a><br />
     
    		  <input type="checkbox" name="tr1" value="459"  /> 2 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=459'>Andrezieu
     
    x-sur-Loire</a><br />
     
    		  <input type="checkbox" name="tr2" value="470"  /> 3 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=470'>Balbigny<
     
    /a><br />
     
    		  <input type="checkbox" name="tr3" value="421"  /> 4 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=421'>Barrage-d
     
    e-la-Palisse</a><br />
     
    		  <input type="checkbox" name="tr4" value="422"  /> 5 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=422'>Barrage-d
     
    u-Peyron</a><br />
     
    		  <input type="checkbox" name="tr5" value="450"  /> 6 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=450'>Bas-en-Ba
     
    sset [1]</a><br />
     
    		  <input type="checkbox" name="tr6" value="451"  /> 7 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=451'>Bas-en-Ba
     
    sset [2]</a><br />
     
    		  <input type="checkbox" name="tr7" value="468"  /> 8 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=468'>Boen-sur-
     
    Lignon</a><br />
     
    		  <input type="checkbox" name="tr8" value="437"  /> 9 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=437'>Chadrac-s
     
    ur-Loire</a><br />
     
    		  <input type="checkbox" name="tr9" value="439"  /> 10 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=439'>Chambon-s
     
    ur-Lignon [1]</a><br />
     
    		  <input type="checkbox" name="tr10" value="440"  /> 11 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=440'>Chambon-s
     
    ur-Lignon [2]</a><br />
     
    		  <input type="checkbox" name="tr11" value="430"  /> 12 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=430'>Coubon 
     
    [rive droite]</a><br />
     
    		  <input type="checkbox" name="tr12" value="434"  /> 13 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=434'>Espaly</a
     
    ><br />
     
    		  <input type="checkbox" name="tr13" value="465"  /> 14 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=465'>Feurs 
     
    [amont]</a><br />
     
    		  <input type="checkbox" name="tr14" value="464"  /> 15 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=464'>Feurs 
     
    [aval]</a><br />
     
    		  <input type="checkbox" name="tr15" value="426"  /> 16 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=426'>Goudet 
     
    [1]</a><br />
     
    		  <input type="checkbox" name="tr16" value="425"  /> 17 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=425'>Goudet 
     
    [2]</a><br />
     
    		  <input type="checkbox" name="tr17" value="458"  /> 18 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=458'>Gouffre-d
     
    'Enfer</a><br />
     
    		  <input type="checkbox" name="tr18" value="455"  /> 19 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=455'>Grangent 
     
    [barrage]</a><br />
     
    		  <input type="checkbox" name="tr19" value="428"  /> 20 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=428'>La 
     
    Besseyre-Haute</a><br />
     
    		  <input type="checkbox" name="tr20" value="445"  /> 21 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=445'>La 
     
    Chapelette-Barrage</a><br />
     
    		  <input type="checkbox" name="tr21" value="433"  /> 22 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=433'>La 
     
    Rochelambert</a><br />
     
    		  <input type="checkbox" name="tr22" value="444"  /> 23 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=444'>Lavalette 
     
    [barrage Versilhac]</a><br />
     
    		  <input type="checkbox" name="tr23" value="453"  /> 24 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=453'>Le 
     
    Crouzet</a><br />
     
    		  <input type="checkbox" name="tr24" value="431"  /> 25 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=431'>Les 
     
    Pandraux</a><br />
     
    		  <input type="checkbox" name="tr25" value="463"  /> 26 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=463'>Montrond-
     
    les-Bains</a><br />
     
    		  <input type="checkbox" name="tr26" value="457"  /> 27 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=457'>Pas-de-Ri
     
    ot</a><br />
     
    		  <input type="checkbox" name="tr27" value="469"  /> 28 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=469'>Poncins</
     
    a><br />
     
    		  <input type="checkbox" name="tr28" value="424"  /> 29 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=424'>Pont-de-l
     
    a-Borie</a><br />
     
    		  <input type="checkbox" name="tr29" value="441"  /> 30 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=441'>Pont-Mari
     
    e</a><br />
     
    		  <input type="checkbox" name="tr30" value="448"  /> 31 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=448'>Sauvessan
     
    ges</a><br />
     
    		  <input type="checkbox" name="tr31" value="472"  /> 32 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=472'>St-Germai
     
    n-Laval</a><br />
     
    		  <input type="checkbox" name="tr32" value="435"  /> 33 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=435'>Vals-Pr&e
     
    grave;s-le-Puy</a><br />
     
    		  <input type="checkbox" name="tr33" value="460"  /> 34 <a 
     
    href='./niveau3.php?idspc=10&amp;typegraphe=q&amp;AffProfondeur=72&amp;AffRef=auto&amp;AffPrevi=non&amp;nbrstations=34&amp;ong=2&amp;idstation=460'>V&eacute;
     
    rines</a><br />
     
    	</p></td>
    </tr>
    <tr><td colspan="2">
    <hr /><p>
      <label class="desactive">Afficher des crues de référence (Vaubarlet)&nbsp;:</label>
    <br/>
          <label class="desactive">
          <input type="radio" name="AffRef" value="auto"  checked="checked" disabled="disabled"/>
        Echelle adaptative</label>
    		<label class="desactive">
          <input type="radio" name="AffRef" value="tous"  disabled="disabled"/>
        Toutes</label>
    	      <label class="desactive">
        <input type="radio" name="AffRef" value="non"  disabled="disabled"/>
        Aucune</label> 
    	<br />
     <!--	<label class="desactive">
        <input name="AffPrevi" type="checkbox" value="oui"  disabled="disabled" />
        Prévisions</label>
    -->
    <br />
    </p>
    <p>
        <input type="hidden" name="nbrstations" value="34"/>
        <input type="hidden" name="ong" value="2"/>
        <input type="submit" name="Submit" value="Refaire le tableau - Valider la sélection" />
    </p>
     
    </td></tr>
    </table>
    </form>
    </div>
    <p class="txt_italique"><br/>
      <img src="image/attention.gif" alt='attention' width="35" height="29" align="left"/>Les donn&eacute;es publi&eacute;es proviennent des r&eacute;seaux 
     
    d'hydrom&eacute;trie des services agissant pour le compte du Minist&egrave;re de l'Ecologie et du D&eacute;veloppement Durable. Il s'agit de donn&eacute;es 
     
    &quot;temps r&eacute;el&quot;, ni critiqu&eacute;es, ni valid&eacute;es, susceptibles d'&ecirc;tre modifi&eacute;es, et n'ayant aucune valeur officielle.</p>
    <p>&nbsp;</p>
      <div class="txtscreen"><p align="center"><a href="./niv_spc.php?idspc=10"  class="lmenu">Retour à la carte du SPC - Loire-Cher-Indre</a></p></div>
       </div>
    		<div class="bas">
    			<div class="coingb"></div>
    			<div class="coindb"></div>
    		</div>
    	</div>
    </div>
     
     
    <p>
    Toutes les heures mentionnées sont en heures locales françaises : U.T.C. (ou GMT) +2.</p>
    </body>
    </html>



    je veux récupérer la date, l'heure et le chiffre situé dans <div class="contenu_cadre"> et mettre tout ça dans une base de donnée appelé crue.

    Je sais que je dois faire une boucle pour aller lire toute les lignes que j'ai besoin, de créer un tableau et d'insérer toutes les données de mon tableau

    dans la base de données.

    J'ai du mal à savoir comment m'y prendre. Si quelqu'un pouvait m'aider, ce serait sympa. ceci a un but écologique, c'est pour connaitre les débits d'eau des rivières d'une année à l'autre.
    Le code le plus adapté pour moi serauit d'utiliser du Perl.

    Merci à tous.

  2. #2
    Membre extrêmement actif
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    1 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 1 418
    Points : 1 658
    Points
    1 658
    Par défaut
    Bonjour,



    je veux récupérer la date, l'heure et le chiffre situé dans <div class="contenu_cadre">
    Ne s’agit-il pas plutôt de l’élément situé entre les balises
    <table class='liste'> et <table/> ?
    Car l’élément qui commence à <div class="contenu_cadre"> se termine à une balise </div> située bien plus bas.



    Et aussi, il s’agit plutôt DES dates-heures-chiffres que tu veux récupérer dans les lignes du type
    bgcolor='#CCCCFF'><td>08/06/2010 13:00</td><td align='right'>3</td></tr><tr bgcolor='#F2F2FF'><td>08/06/2010 12:30</td><td align='right'>3</td></tr><tr
    n’est ce pas ?





    Pour faire une telle extraction, c’est aux expressions régulières qu’on s’adresse de façon habituelle.
    Perl est très bien pour faire ce que tu veux avec des expressions régulières.
    Mais quel est ton niveau en Perl ?
    Pourquoi es tu embarassé pour savoir comment t’y prendre ?
    Connais-tu les expressions régulières ?
    Ce travail est il un devoir d’étudiant ?

    Je ne peux pas t’aider pour écrire un code en Perl, je ne connais pas ce langage. Je pense qu’il va y avoir des perleurs qui vont t’aider pour cela.
    Mais si tu te débrouilles bien en Perl, je peux t’aider pour la chaîne d’expression régulière à écrire.





    Question: qu’est ce que ça a d’écologique de connaître les débits d’une rivière ?

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 18
    Points : 10
    Points
    10
    Par défaut
    Bonjour Eyquem,

    Ne s’agit-il pas plutôt de l’élément situé entre les balises
    <table class='liste'> et <table/> ?
    Car l’élément qui commence à <div class="contenu_cadre"> se termine à une balise </div> située bien plus bas.
    En effet, il s'agit de récupérer les dates et donnes qui se trouve dans la balise <div class="contenu_cadre"> ...</div>

    Je sais récupérer la page html avec lynx et faire un grep sur l'expression régulière <div class="contenu_cadre"> pour ne garder que la ligne des données necessaire. par contre, j'ai du mal à récupérer les données pour effectuer un tableau.

    Et aussi, il s’agit plutôt DES dates-heures-chiffres que tu veux récupérer dans les lignes du type
    bgcolor='#CCCCFF'><td>08/06/2010 13:00</td><td align='right'>3</td></tr><tr bgcolor='#F2F2FF'><td>08/06/2010 12:30</td><td align='right'>3</td></tr><tr
    n’est ce pas ?
    C'est tout à fait ça. Je veux récupérer la date et heure puis le chiffre qui correspond au cubage.

    Pour faire une telle extraction, c’est aux expressions régulières qu’on s’adresse de façon habituelle.
    Perl est très bien pour faire ce que tu veux avec des expressions régulières.
    Mais quel est ton niveau en Perl ?
    Pourquoi es tu embarassé pour savoir comment t’y prendre ?
    Connais-tu les expressions régulières ?
    Ce travail est il un devoir d’étudiant ?
    Mon niveau de Perl est débutant, je connais mieux le C
    Je suis embarassé pour récupérer les dates et chiffre pour les insérer dans une base de données Mysql
    Je connais les expressions régulière en shell
    C'est un devoir personnel pour communiquer ces données à titre gracieux à des associations de pêches pour connaitre l'évolution des niveaux des rivières au fil des années.

    Question: qu’est ce que ça a d’écologique de connaître les débits d’une rivière ?
    Cela permet de savoir par région les débit d'eau au fil des années et ainsi déterminer l'impact du réchauffement climatique sur nos rivières et fleuves.

  4. #4
    Membre extrêmement actif
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    1 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 1 418
    Points : 1 658
    Points
    1 658
    Par défaut
    Aucun message n’étant venu depuis ce matin, je me permets de poster un code en Python que je connais mieux que Perl.

    Comme tu connais les expressions régulières, çà devrait t’aider à écrire ton propre code en Perl:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    import urllib.request,re
     
    url = 'http://www.vigicrues.ecologie.gouv.fr/niveau3.php?'\
          +'idspc=10&typegraphe=q&AffProfondeur=72&AffRef=tous'\
          +'&AffPrevi=non&nbrstations=34&ong=2&idstation=446'
     
    RE = "bgcolor='#[CF2]{6}'><td>(\d\d/\d\d/201\d) (\d\d:\d\d)"\
         +"</td><td align='right'>([\d.]+)</td></tr><tr"
     
    binary_pat = re.compile(RE.encode())
     
     
    sock = urllib.request.urlopen(url)
    uh = sock.read()
    sock.close()
     
    recup = [ ( date.decode(), heure.decode(), int(val) )
              for (date,heure,val) in binary_pat.findall(uh) ]
     
    print(type(recup),type(recup[0]))
    print(type(recup[0][0]),type(recup[0][1]),type(recup[0][2]))
    print ('\n'.join(map(repr,recup)))

    Dans binary_pat.findall(uh) les données sont sous forme de bytes.

    Il faut donc un traitement pour récupérer la date et l’heure sous forme de chaîne de caractères et le débit sous forme d’entier.


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    <class 'list'> <class 'tuple'>
    <class 'str'> <class 'str'> <class 'int'>
    ('11/06/2010', '16:00', 3)
    ('11/06/2010', '15:30', 3)
    ('11/06/2010', '15:00', 3)
    ('11/06/2010', '14:30', 3)
    ('11/06/2010', '14:00', 3)
    ('11/06/2010', '13:30', 3)
    ('11/06/2010', '13:00', 3)
    ('11/06/2010', '12:30', 3)
    ('11/06/2010', '12:00', 3)
    ('11/06/2010', '11:30', 3)
    ('11/06/2010', '11:00', 3)
    ('11/06/2010', '10:30', 3)
    ('11/06/2010', '10:00', 3)
    ('11/06/2010', '09:30', 3)
    ('11/06/2010', '09:00', 3)
    ('11/06/2010', '08:30', 3)
    ('11/06/2010', '08:00', 3)
    ('11/06/2010', '07:30', 3)
    ('11/06/2010', '07:00', 3)
    ('11/06/2010', '06:30', 3)
    ('11/06/2010', '06:00', 3)
    ('11/06/2010', '05:30', 3)
    ('11/06/2010', '05:00', 3)
    ('11/06/2010', '04:30', 3)
    ('11/06/2010', '04:00', 3)
    ('11/06/2010', '03:30', 3)
    ('11/06/2010', '03:00', 3)
    ('11/06/2010', '02:30', 3)
    ('11/06/2010', '02:00', 3)
    ('11/06/2010', '01:30', 2)
    ('11/06/2010', '01:00', 2)
    ('11/06/2010', '00:30', 2)
    ('11/06/2010', '00:00', 2)
    ('10/06/2010', '23:30', 2)
    ('10/06/2010', '23:00', 2)
    ('10/06/2010', '22:30', 2)
    ('10/06/2010', '22:00', 2)
    ('10/06/2010', '21:30', 2)
    ('10/06/2010', '21:00', 2)
    ('10/06/2010', '20:30', 2)
    ('10/06/2010', '20:00', 2)
    ('10/06/2010', '19:30', 2)
    ('10/06/2010', '19:00', 2)
    ('10/06/2010', '18:30', 2)
    ('10/06/2010', '18:00', 2)
    ('10/06/2010', '17:30', 2)
    ('10/06/2010', '17:00', 2)
    ('10/06/2010', '16:30', 2)
    ('10/06/2010', '16:00', 2)
    ('10/06/2010', '15:30', 2)
    ('10/06/2010', '15:00', 2)
    ('10/06/2010', '14:30', 2)
    ('10/06/2010', '14:00', 2)
    ('10/06/2010', '13:30', 2)
    ('10/06/2010', '13:00', 2)
    ('10/06/2010', '12:30', 2)
    ('10/06/2010', '12:00', 2)
    ('10/06/2010', '11:30', 2)
    ('10/06/2010', '11:00', 2)
    ('10/06/2010', '10:30', 2)
    ('10/06/2010', '10:00', 2)
    ('10/06/2010', '09:30', 2)
    ('10/06/2010', '09:00', 2)
    ('10/06/2010', '08:30', 2)
    ('10/06/2010', '08:00', 2)
    ('10/06/2010', '07:30', 2)
    ('10/06/2010', '07:00', 2)
    ('10/06/2010', '06:30', 2)
    ('10/06/2010', '06:00', 2)
    ('10/06/2010', '05:30', 2)
    ('10/06/2010', '05:00', 2)
    ('10/06/2010', '04:30', 2)
    ('10/06/2010', '04:00', 2)
    ('10/06/2010', '03:30', 2)
    ('10/06/2010', '03:00', 2)
    ('10/06/2010', '02:30', 2)
    ('10/06/2010', '02:00', 2)
    ('10/06/2010', '01:30', 2)
    ('10/06/2010', '01:00', 2)
    ('10/06/2010', '00:30', 2)
    ('10/06/2010', '00:00', 2)
    ('09/06/2010', '23:30', 2)
    ('09/06/2010', '23:00', 2)
    ('09/06/2010', '22:30', 2)
    ('09/06/2010', '22:00', 2)
    ('09/06/2010', '21:30', 2)
    ('09/06/2010', '21:00', 2)
    ('09/06/2010', '20:30', 2)
    ('09/06/2010', '20:00', 2)
    ('09/06/2010', '19:30', 2)
    ('09/06/2010', '19:00', 2)
    ('09/06/2010', '18:30', 2)
    ('09/06/2010', '18:00', 2)
    ('09/06/2010', '17:30', 2)
    ('09/06/2010', '17:00', 2)
    ('09/06/2010', '16:30', 2)
    ('09/06/2010', '16:00', 2)
    ('09/06/2010', '15:30', 2)
    ('09/06/2010', '15:00', 2)
    ('09/06/2010', '14:30', 2)
    ('09/06/2010', '14:00', 2)
    ('09/06/2010', '13:30', 2)
    ('09/06/2010', '13:00', 3)
    ('09/06/2010', '12:30', 3)
    ('09/06/2010', '12:00', 3)
    ('09/06/2010', '11:30', 3)
    ('09/06/2010', '11:00', 3)
    ('09/06/2010', '10:30', 3)
    ('09/06/2010', '10:00', 3)
    ('09/06/2010', '09:30', 3)
    ('09/06/2010', '09:00', 3)
    ('09/06/2010', '08:30', 3)
    ('09/06/2010', '08:00', 3)
    ('09/06/2010', '07:30', 3)
    ('09/06/2010', '07:00', 3)
    ('09/06/2010', '06:30', 3)
    ('09/06/2010', '06:00', 3)
    ('09/06/2010', '05:30', 3)
    ('09/06/2010', '05:00', 3)
    ('09/06/2010', '04:30', 3)
    ('09/06/2010', '04:00', 3)
    ('09/06/2010', '03:30', 3)
    ('09/06/2010', '03:00', 3)
    ('09/06/2010', '02:30', 3)
    ('09/06/2010', '02:00', 3)
    ('09/06/2010', '01:30', 3)
    ('09/06/2010', '01:00', 3)
    ('09/06/2010', '00:30', 3)
    ('09/06/2010', '00:00', 3)
    ('08/06/2010', '23:30', 3)
    ('08/06/2010', '23:00', 3)
    ('08/06/2010', '22:30', 3)
    ('08/06/2010', '22:00', 3)
    ('08/06/2010', '21:30', 3)
    ('08/06/2010', '21:00', 3)
    ('08/06/2010', '20:30', 3)
    ('08/06/2010', '20:00', 3)
    ('08/06/2010', '19:30', 3)

  5. #5
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 18
    Points : 10
    Points
    10
    Par défaut SUper EYquem
    Super ton programme,
    J'ai pu faire la même chose avec un script shell.
    je trouve ce résultat.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
     
    ('12/06/2010', '06:30:00', '2')
    ('12/06/2010', '05:30:00', '2')
    ('12/06/2010', '04:30:00', '2')
    ('12/06/2010', '03:30:00', '2')
    ('12/06/2010', '02:30:00', '2')
    ('12/06/2010', '01:30:00', '2')
    ('12/06/2010', '00:30:00', '2')
    ('11/06/2010', '23:30:00', '2')
    ('11/06/2010', '22:30:00', '2')
    ('11/06/2010', '21:30:00', '2')
    ('11/06/2010', '20:30:00', '2')
    ('11/06/2010', '19:30:00', '2')
    ('11/06/2010', '18:30:00', '2')
    ('11/06/2010', '17:30:00', '3')
    ('11/06/2010', '16:30:00', '3')
    ('11/06/2010', '15:30:00', '3')
    ('11/06/2010', '14:30:00', '3')
    ('11/06/2010', '13:30:00', '3')
    ('11/06/2010', '12:30:00', '3')
    ('11/06/2010', '11:30:00', '3')
    ('11/06/2010', '10:30:00', '3')
    ('11/06/2010', '09:30:00', '3')
    ('11/06/2010', '08:30:00', '3')
    ('11/06/2010', '07:30:00', '3')
    ('11/06/2010', '06:30:00', '3')
    ('11/06/2010', '05:30:00', '3')
    ('11/06/2010', '04:30:00', '3')
    ('11/06/2010', '03:30:00', '3')
    ('11/06/2010', '02:30:00', '3')
    ('11/06/2010', '01:30:00', '2')
    ('11/06/2010', '00:30:00', '2')
    ('10/06/2010', '23:30:00', '2')
    ('10/06/2010', '22:30:00', '2')
    ('10/06/2010', '21:30:00', '2')
    ('10/06/2010', '20:30:00', '2')
    ('10/06/2010', '19:30:00', '2')
    ('10/06/2010', '18:30:00', '2')
    ('10/06/2010', '17:30:00', '2')
    ('10/06/2010', '16:30:00', '2')
    ('10/06/2010', '15:30:00', '2')
    ('10/06/2010', '14:30:00', '2')
    ('10/06/2010', '13:30:00', '2')
    ('10/06/2010', '12:30:00', '2')
    ('10/06/2010', '11:30:00', '2')
    ('10/06/2010', '10:30:00', '2')
    ('10/06/2010', '09:30:00', '2')
    ('10/06/2010', '08:30:00', '2')
    ('10/06/2010', '07:30:00', '2')
    ('10/06/2010', '06:30:00', '2')
    ('10/06/2010', '05:30:00', '2')
    ('10/06/2010', '04:30:00', '2')
    ('10/06/2010', '03:30:00', '2')
    ('10/06/2010', '02:30:00', '2')
    ('10/06/2010', '01:30:00', '2')
    ('10/06/2010', '00:30:00', '2')
    ('09/06/2010', '23:30:00', '2')
    ('09/06/2010', '22:30:00', '2')
    ('09/06/2010', '21:30:00', '2')
    ('09/06/2010', '20:30:00', '2')
    ('09/06/2010', '19:30:00', '2')
    ('09/06/2010', '18:30:00', '2')
    ('09/06/2010', '17:30:00', '2')
    ('09/06/2010', '16:30:00', '2')
    ('09/06/2010', '15:30:00', '2')
    ('09/06/2010', '14:30:00', '2')
    ('09/06/2010', '13:30:00', '2')
    ('09/06/2010', '12:30:00', '3')
    ('09/06/2010', '11:30:00', '3')
    ('09/06/2010', '10:30:00', '3')
    ('09/06/2010', '09:30:00', '3')
    ('09/06/2010', '08:30:00', '3')
    ('09/06/2010', '07:30:00', '3')
    ('09/06/2010', '06:30:00', '3')
    ('09/06/2010', '05:30:00', '3')
    ('09/06/2010', '04:30:00', '3')
    ('09/06/2010', '03:30:00', '3')
    ('09/06/2010', '02:30:00', '3')
    ('09/06/2010', '01:30:00', '3')
    ('09/06/2010', '00:30:00', '3')
    ('08/06/2010', '23:30:00', '3')
    ('08/06/2010', '22:30:00', '3')
    ('08/06/2010', '21:30:00', '3')
    ('08/06/2010', '20:30:00', '3')
    ('08/06/2010', '19:30:00', '3')
    ('08/06/2010', '18:30:00', '3')
    ('08/06/2010', '17:30:00', '3')
    ('08/06/2010', '16:30:00', '3')
    ('08/06/2010', '15:30:00', '3')
    ('08/06/2010', '14:30:00', '3')
    ('08/06/2010', '13:30:00', '3')
    ('08/06/2010', '12:30:00', '3')
    ('08/06/2010', '11:30:00', '3')
    ('08/06/2010', '10:30:00', '3')
    ('08/06/2010', '09:30:00', '3')
    ('08/06/2010', '08:30:00', '3')
    ('08/06/2010', '07:30:00', '3')
    ('08/06/2010', '06:30:00', '3')
    ('08/06/2010', '05:30:00', '3')
    ('08/06/2010', '04:30:00', '3')
    ('08/06/2010', '03:30:00', '3')
    ('08/06/2010', '02:30:00', '3')
    ('08/06/2010', '01:30:00', '3')
    ('08/06/2010', '00:30:00', '3')
    ('07/06/2010', '23:30:00', '3')
    ('07/06/2010', '22:30:00', '3')
    ('07/06/2010', '21:30:00', '3')
    ('07/06/2010', '20:30:00', '3')
    ('07/06/2010', '19:30:00', '3')
    ('07/06/2010', '18:30:00', '3')
    ('07/06/2010', '17:30:00', '3')
    ('07/06/2010', '16:30:00', '3')
    ('07/06/2010', '15:30:00', '3')
    ('07/06/2010', '14:30:00', '4')
    ('07/06/2010', '13:30:00', '4')
    ('07/06/2010', '12:30:00', '4')
    ('07/06/2010', '11:30:00', '4')
    ('07/06/2010', '10:30:00', '4')
    ('07/06/2010', '09:30:00', '4')
    ('07/06/2010', '08:30:00', '4')
    ('07/06/2010', '07:30:00', '4')
    ('07/06/2010', '06:30:00', '4')
    ('07/06/2010', '05:30:00', '4')
    ('07/06/2010', '04:30:00', '4')
    ('07/06/2010', '03:30:00', '4')
    ('07/06/2010', '02:30:00', '4')
    ('07/06/2010', '01:30:00', '4')
    ('07/06/2010', '00:30:00', '4')
    ('06/06/2010', '23:30:00', '3')
    ('06/06/2010', '22:30:00', '3')
    ('06/06/2010', '21:30:00', '2')
    ('06/06/2010', '20:30:00', '2')
    ('06/06/2010', '19:30:00', '2')
    ('06/06/2010', '18:30:00', '2')
    ('06/06/2010', '17:30:00', '2')
    ('06/06/2010', '16:30:00', '2')
    ('06/06/2010', '15:30:00', '2')
    ('06/06/2010', '14:30:00', '2')
    ('06/06/2010', '13:30:00', '2')
    ('06/06/2010', '12:30:00', '2')
    ('06/06/2010', '11:30:00', '2')
    ('06/06/2010', '10:30:00', '2')
    ('06/06/2010', '09:30:00', '2')
    ('06/06/2010', '08:30:00', '2')
    ('06/06/2010', '07:30:00', '2')
    ('06/06/2010', '06:30:00', '2')
    ('06/06/2010', '05:30:00', '2')
    ('06/06/2010', '04:30:00', '2')
    ('06/06/2010', '03:30:00', '2')
    ('06/06/2010', '02:30:00', '2')
    ('06/06/2010', '01:30:00', '2')
    ('06/06/2010', '00:30:00', '2')
    ('05/06/2010', '23:30:00', '2')
    ('05/06/2010', '22:30:00', '2')
    ('05/06/2010', '21:30:00', '2')
    ('05/06/2010', '20:30:00', '2')
    ('05/06/2010', '19:30:00', '2')
    ('05/06/2010', '18:30:00', '2')
    ('05/06/2010', '17:30:00', '2')
    ('05/06/2010', '16:30:00', '2')
    ('05/06/2010', '15:30:00', '2')
    ('05/06/2010', '14:30:00', '2')
    ('05/06/2010', '13:30:00', '2')
    ('05/06/2010', '12:30:00', '2')
    ('05/06/2010', '11:30:00', '2')
    ('05/06/2010', '10:30:00', '2')
    ('05/06/2010', '09:30:00', '2')
    ('05/06/2010', '08:30:00', '2')
    ('05/06/2010', '07:30:00', '2')
    ('05/06/2010', '06:30:00', '2')
    ('05/06/2010', '05:30:00', '2')
    ('05/06/2010', '04:30:00', '3')
    ('05/06/2010', '03:30:00', '3')
    ('05/06/2010', '02:30:00', '3')
    ('05/06/2010', '01:30:00', '3')
    ('05/06/2010', '00:30:00', '3')
    ('04/06/2010', '23:30:00', '3')
    ('04/06/2010', '22:30:00', '3')
    ('04/06/2010', '21:30:00', '3')
    ('04/06/2010', '20:30:00', '3')
    ('04/06/2010', '19:30:00', '3')
    ('04/06/2010', '18:30:00', '3')
    ('04/06/2010', '17:30:00', '3')
    ('04/06/2010', '16:30:00', '3')
    ('04/06/2010', '15:30:00', '3')
    ('04/06/2010', '14:30:00', '3')
    ('04/06/2010', '13:30:00', '3')
    ('04/06/2010', '12:30:00', '3')
    ('04/06/2010', '11:30:00', '3')
    ('04/06/2010', '10:30:00', '3')
    ('04/06/2010', '09:30:00', '3')
    ('04/06/2010', '08:30:00', '3')
    ('04/06/2010', '07:30:00', '3')
    ('04/06/2010', '06:30:00', '3')
    ('04/06/2010', '05:30:00', '3')
    ('04/06/2010', '04:30:00', '3')
    ('04/06/2010', '03:30:00', '3')
    ('04/06/2010', '02:30:00', '3')
    ('04/06/2010', '01:30:00', '3')
    ('04/06/2010', '00:30:00', '3')
    ('03/06/2010', '23:30:00', '3')
    ('03/06/2010', '22:30:00', '3')
    ('03/06/2010', '21:30:00', '3')
    ('03/06/2010', '20:30:00', '3')
    ('03/06/2010', '19:30:00', '3')
    ('03/06/2010', '18:30:00', '3')
    ('03/06/2010', '17:30:00', '3')
    ('03/06/2010', '16:30:00', '3')
    ('03/06/2010', '15:30:00', '3')
    ('03/06/2010', '14:30:00', '3')
    ('03/06/2010', '13:30:00', '3')
    ('03/06/2010', '12:30:00', '3')
    ('03/06/2010', '11:30:00', '3')
    ('03/06/2010', '10:30:00', '3')
    ('03/06/2010', '09:30:00', '3')
    ('03/06/2010', '08:30:00', '3')
    ('03/06/2010', '07:30:00', '3')
    ('03/06/2010', '06:30:00', '3')
    ('03/06/2010', '05:30:00', '3')
    ('03/06/2010', '04:30:00', '3')
    ('03/06/2010', '03:30:00', '3')
    ('03/06/2010', '02:30:00', '4')
    ('03/06/2010', '01:30:00', '4')
    ('03/06/2010', '00:30:00', '4')
    ('02/06/2010', '23:30:00', '4')
    ('02/06/2010', '22:30:00', '4')
    ('02/06/2010', '21:30:00', '4')
    ('02/06/2010', '20:30:00', '4')
    ('02/06/2010', '19:30:00', '4')
    ('02/06/2010', '18:30:00', '4')
    ('02/06/2010', '17:30:00', '3')
    ('02/06/2010', '16:30:00', '3')
    ('02/06/2010', '15:30:00', '3')
    ('02/06/2010', '14:30:00', '3')
    ('02/06/2010', '13:30:00', '3')
    ('02/06/2010', '12:30:00', '3')
    ('02/06/2010', '11:30:00', '3')
    ('02/06/2010', '10:30:00', '3')
    ('02/06/2010', '09:30:00', '3')
    ('02/06/2010', '08:30:00', '3')
    ('02/06/2010', '07:30:00', '3')
    ('02/06/2010', '06:30:00', '3')
    ('02/06/2010', '05:30:00', '3')
    ('02/06/2010', '04:30:00', '3')
    ('02/06/2010', '03:30:00', '3')
    ('02/06/2010', '02:30:00', '3')
    ('02/06/2010', '01:30:00', '3')
    ('02/06/2010', '00:30:00', '3')
    ('01/06/2010', '23:30:00', '3')
    ('01/06/2010', '22:30:00', '3')
    ('01/06/2010', '21:30:00', '3')
    ('01/06/2010', '20:30:00', '3')
    ('01/06/2010', '19:30:00', '3')
    ('01/06/2010', '18:30:00', '3')
    ('01/06/2010', '17:30:00', '3')
    ('01/06/2010', '16:30:00', '3')
    ('01/06/2010', '15:30:00', '3')
    ('01/06/2010', '14:30:00', '3')
    ('01/06/2010', '13:30:00', '3')
    ('01/06/2010', '12:30:00', '3')
    ('01/06/2010', '11:30:00', '3')
    ('01/06/2010', '10:30:00', '3')
    ('01/06/2010', '09:30:00', '3')
    ('01/06/2010', '08:30:00', '3')
    ('01/06/2010', '07:30:00', '3')
    ('01/06/2010', '06:30:00', '3')
    ('01/06/2010', '05:30:00', '3')
    ('01/06/2010', '04:30:00', '3')
    ('01/06/2010', '03:30:00', '3')
    ('01/06/2010', '02:30:00', '4')
    ('01/06/2010', '01:30:00', '4')
    ('01/06/2010', '00:30:00', '4')
    ('31/05/2010', '23:30:00', '4')
    ('31/05/2010', '22:30:00', '4')
    ('31/05/2010', '21:30:00', '4')
    ('31/05/2010', '20:30:00', '4')
    ('31/05/2010', '19:30:00', '4')
    ('31/05/2010', '18:30:00', '4')
    ('31/05/2010', '17:30:00', '4')
    ('31/05/2010', '16:30:00', '4')
    ('31/05/2010', '15:30:00', '4')
    ('31/05/2010', '14:30:00', '3')
    ('31/05/2010', '13:30:00', '3')
    ('31/05/2010', '12:30:00', '3')
    ('31/05/2010', '11:30:00', '3')
    ('31/05/2010', '10:30:00', '3')
    ('31/05/2010', '09:30:00', '3')
    ('31/05/2010', '08:30:00', '3')
    ('31/05/2010', '07:30:00', '3')
    ('31/05/2010', '06:30:00', '3')
    ('31/05/2010', '05:30:00', '3')
    ('31/05/2010', '04:30:00', '3')
    ('31/05/2010', '03:30:00', '3')
    ('31/05/2010', '02:30:00', '3')
    ('31/05/2010', '01:30:00', '3')
    ('31/05/2010', '00:30:00', '3')
    ('30/05/2010', '23:30:00', '3')
    ('30/05/2010', '22:30:00', '3')
    ('30/05/2010', '21:30:00', '3')
    ('30/05/2010', '20:30:00', '3')
    ('30/05/2010', '19:30:00', '3')
    ('30/05/2010', '18:30:00', '3')
    ('30/05/2010', '17:30:00', '3')
    ('30/05/2010', '16:30:00', '3')
    ('30/05/2010', '15:30:00', '3')
    ('30/05/2010', '14:30:00', '3')
    ('30/05/2010', '13:30:00', '3')
    ('30/05/2010', '12:30:00', '3')
    ('30/05/2010', '11:30:00', '3')
    ('30/05/2010', '10:30:00', '3')
    ('30/05/2010', '09:30:00', '3')
    ('30/05/2010', '08:30:00', '3')
    ('30/05/2010', '07:30:00', '3')
    ('30/05/2010', '06:30:00', '3')
    ('30/05/2010', '05:30:00', '3')
    ('30/05/2010', '04:30:00', '3')
    ('30/05/2010', '03:30:00', '3')
    ('30/05/2010', '02:30:00', '3')
    ('30/05/2010', '01:30:00', '3')
    ('30/05/2010', '00:30:00', '3')
    ('29/05/2010', '23:30:00', '3')
    ('29/05/2010', '22:30:00', '3')
    ('29/05/2010', '21:30:00', '3')
    ('29/05/2010', '20:30:00', '3')
    ('29/05/2010', '19:30:00', '3')
    ('29/05/2010', '18:30:00', '3')
    ('29/05/2010', '17:30:00', '3')
    ('29/05/2010', '16:30:00', '3')
    ('29/05/2010', '15:30:00', '3')
    ('29/05/2010', '14:30:00', '3')
    ('29/05/2010', '13:30:00', '3')
    ('29/05/2010', '12:30:00', '3')
    ('29/05/2010', '11:30:00', '3')
    ('29/05/2010', '10:30:00', '3')
    ('29/05/2010', '09:30:00', '3')
    ('29/05/2010', '08:30:00', '3')
    ('29/05/2010', '07:30:00', '3')
    ('29/05/2010', '06:30:00', '3')
    ('29/05/2010', '05:30:00', '3')
    ('29/05/2010', '04:30:00', '3')
    ('29/05/2010', '03:30:00', '3')
    ('29/05/2010', '02:30:00', '3')
    ('29/05/2010', '01:30:00', '3')
    ('29/05/2010', '00:30:00', '3')
    ('28/05/2010', '23:30:00', '3')
    ('28/05/2010', '22:30:00', '3')
    ('28/05/2010', '21:30:00', '3')
    ('28/05/2010', '20:30:00', '3')
    ('28/05/2010', '19:30:00', '3')
    ('28/05/2010', '18:30:00', '3')
    ('28/05/2010', '17:30:00', '3')
    ('28/05/2010', '16:30:00', '3')
    ('28/05/2010', '15:30:00', '3')
    ('28/05/2010', '14:30:00', '3')
    ('28/05/2010', '13:30:00', '4')
    ('28/05/2010', '12:30:00', '4')
    ('28/05/2010', '11:30:00', '4')
    ('28/05/2010', '10:30:00', '4')
    ('28/05/2010', '09:30:00', '4')
    ('28/05/2010', '08:30:00', '4')
    ('28/05/2010', '07:30:00', '4')
    ('28/05/2010', '06:30:00', '4')
    ('28/05/2010', '05:30:00', '4')
    ('28/05/2010', '04:30:00', '4')
    ('28/05/2010', '03:30:00', '4')
    ('28/05/2010', '02:30:00', '4')
    ('28/05/2010', '01:30:00', '4')
    ('28/05/2010', '00:30:00', '4')
    ('27/05/2010', '23:30:00', '4')
    ('27/05/2010', '22:30:00', '4')
    ('27/05/2010', '21:30:00', '4')
    ('27/05/2010', '20:30:00', '4')
    ('27/05/2010', '19:30:00', '4')
    ('27/05/2010', '18:30:00', '4')
    ('27/05/2010', '17:30:00', '4')
    ('27/05/2010', '16:30:00', '4')
    ('27/05/2010', '15:30:00', '4')
    ('27/05/2010', '14:30:00', '4')
    ('27/05/2010', '13:30:00', '4')
    ('27/05/2010', '12:30:00', '4')
    ('27/05/2010', '11:30:00', '5')
    ('27/05/2010', '10:30:00', '5')
    ('27/05/2010', '09:30:00', '5')
    ('27/05/2010', '08:30:00', '5')
    ('27/05/2010', '07:30:00', '5')
    ('27/05/2010', '06:30:00', '6')
    ('27/05/2010', '05:30:00', '6')
    ('27/05/2010', '04:30:00', '6')
    ('27/05/2010', '03:30:00', '6')
    ('27/05/2010', '02:30:00', '6')
    ('27/05/2010', '01:30:00', '6')
    ('27/05/2010', '00:30:00', '6')
    ('26/05/2010', '23:30:00', '7')
    ('26/05/2010', '22:30:00', '7')
    ('26/05/2010', '21:30:00', '6')
    ('26/05/2010', '20:30:00', '5')
    ('26/05/2010', '19:30:00', '4')
    ('26/05/2010', '18:30:00', '4')
    ('26/05/2010', '17:30:00', '3')
    ('26/05/2010', '16:30:00', '3')
    ('26/05/2010', '15:30:00', '3')
    ('26/05/2010', '14:30:00', '3')
    ('26/05/2010', '13:30:00', '3')
    ('26/05/2010', '12:30:00', '3')
    ('26/05/2010', '11:30:00', '3')
    ('26/05/2010', '10:30:00', '3')
    ('26/05/2010', '09:30:00', '3')
    ('26/05/2010', '08:30:00', '3')
    ('26/05/2010', '07:30:00', '3')
    ('26/05/2010', '06:30:00', '3')
    ('26/05/2010', '05:30:00', '3')
    ('26/05/2010', '04:30:00', '3')
    ('26/05/2010', '03:30:00', '3')
    ('26/05/2010', '02:30:00', '3')
    ('26/05/2010', '01:30:00', '3')
    ('26/05/2010', '00:30:00', '3')
    ('25/05/2010', '23:30:00', '3')
    ('25/05/2010', '22:30:00', '3')
    ('25/05/2010', '21:30:00', '3')
    ('25/05/2010', '20:30:00', '3')
    ('25/05/2010', '19:30:00', '3')
    ('25/05/2010', '18:30:00', '3')
    ('25/05/2010', '17:30:00', '3')
    ('25/05/2010', '16:30:00', '3')
    ('25/05/2010', '15:30:00', '3')
    ('25/05/2010', '14:30:00', '3')
    ('25/05/2010', '13:30:00', '3')
    ('25/05/2010', '12:30:00', '3')
    ('25/05/2010', '11:30:00', '3')
    ('25/05/2010', '10:30:00', '3')
    ('25/05/2010', '09:30:00', '3')
    ('25/05/2010', '08:30:00', '3')
    ('25/05/2010', '07:30:00', '3')
    ('25/05/2010', '06:30:00', '3')
    ('25/05/2010', '05:30:00', '3')
    ('25/05/2010', '04:30:00', '3')
    ('25/05/2010', '03:30:00', '3')
    ('25/05/2010', '02:30:00', '3')
    Je dois juste insérer ces données dans une base de données avec Perl et le tour est joué.
    Je devrais enfin trouvé un outil qui permette de mettre en forme ces données sous forme de tableau ( si quelqu'un en connait un je suis preneur)





    Je te remercie.

  6. #6
    Membre extrêmement actif
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    1 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 1 418
    Points : 1 658
    Points
    1 658
    Par défaut
    De rien.

    Je ne peux pas t’aider plus, je ne connais pas les BDD.

    Je devrais enfin trouver un outil qui permette de mettre en forme ces données sous forme de tableau
    Tu veux dire: pour afficher sous forme de tableau ces données aprés leur lecture dans la BDD ?

    Et faire ceci en Perl ? ou en parlant d’outil tu penses à n’importe quelle autre possibilité ?
    Tu cherches à pouvoir faire un tel affichge pour toi (en Perl) ou pour ton association (autre outil éventuellement) ?

    PS


    J’aurais bien aimé bien voir un code en Perl faisant la récupération des données voulues par all4linux par expression régulière.

    Quelqu’un pourrait-il satisfaire ma curiosité , svp ?

    Il suffit de prendre la RE suivante

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    "bgcolor='#[CF2]{6}'><td>(\d\d/\d\d/201\d) (\d\d:\d\d)</td><td align='right'>([\d.]+)</td></tr><tr"
    et ça doit se faire en même pas 10 minutes.



    Merci

  7. #7
    Membre à l'essai
    Profil pro
    Inscrit en
    Septembre 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2005
    Messages : 18
    Points : 10
    Points
    10
    Par défaut
    Tu veux dire: pour afficher sous forme de tableau ces données aprés leur lecture dans la BDD ?
    Oui c'est ça

    Et faire ceci en Perl ? ou en parlant d’outil tu penses à n’importe quelle autre possibilité ?
    un outil graphique permettant d'exploiter les données

    Tu cherches à pouvoir faire un tel affichge pour toi (en Perl) ou pour ton association (autre outil éventuellement) ?
    Pour moi et mon association

    Je t'envoie ce que j'ai fait:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    wget -q -O export.txt "http://www.vigicrues.ecologie.gouv.fr/niveau3.php?idstation=446&idspc=10&typegraphe=q&AffProfondeur=5000&AffRef=auto&AffPrevi=non&nbrstations=34&ong=2"
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    sed "s/<\/td><\/tr>/<\/td><\/tr>\\r\n/g" export.txt | grep "#F2F2FF" | sed -e "s/<\/td><td align='right'>/:00 /g" | sed -e "s/ /','%d-%m-%Y'), '/g" | sed -e "s/<\/td><\/tr>/');/g" | sed -e "s/.*<td>/insert\ into\ veaubarlet\ (date,time,debit)\ values\ (STR_TO_DATE('/g" | sed -e "s/\//-/g" | cut -c1-98,111-
    C'est un peu usine à gaz mais ça fonctionne

Discussions similaires

  1. Récupérer données dans fichier .txt
    Par hugues6358 dans le forum Général Python
    Réponses: 25
    Dernier message: 09/12/2013, 09h08
  2. Script pour exporter des données dans fichier texte
    Par dionmaxime dans le forum MS SQL Server
    Réponses: 1
    Dernier message: 15/03/2011, 05h18
  3. [Cryptage] Récupérer Date cryptée dans fichier text
    Par SansSucre dans le forum Access
    Réponses: 2
    Dernier message: 29/07/2006, 13h03
  4. [pl/sql] Récupérer des données dans fichier
    Par claralavraie dans le forum Oracle
    Réponses: 22
    Dernier message: 13/07/2006, 16h49
  5. Réponses: 1
    Dernier message: 19/01/2006, 19h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo