Bonjour,
Je souhaiterais pouvoir, à partir de mon application télécharger des données sur une page Web.
Pour cela je dois fournir à cette page certaines informations issues de mon application.
Pourriez vous me dire comment pratiquer?
Voici le code de la page Web en question:
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 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Navlost.eu - METAR and TAF Archive</title> <link rel="stylesheet" type="text/css" href="/css/style-1col.css" /> </head> <body> <div id="header"> <h1>Navlost.eu</h1> <h2><!---Navigation & --->Positioning Resources</h2> <div id="menu"> <ul id="nav"> <li><a href="/" accesskey="H">Home</a></li> <li><a href="/nwxs/doc/desc" >NWX</a></li> <li><a href="/aero/met" >Weather</a></li> <li><a href="/weather/marine" >Maritime Forecast</a></li> <li><a href="/aero/fpl" >VFR Flight Planner</a></li> <li><a href="/survey/gpsd/" >qtGPSc</a></li> <li><a href="/contact">Contact</a></li> </ul> </div> </div> <div id="content"><div id="right"> <!--- Main content Starts Here ---> <h2>METAR and TAF Archive</h2> <p><form id="aero.metar.search" action="http://navlost.eu/aero/metar/" method="get"> <table> <tr><th>ICAO</th><td><input type="text" name="icao" value="" title="ICAO identifier(s) to retrieve"/> <span style="font-size:8pt;color:darkgray;"><i>E.g.:</i> LFMD <i>(separate multiple identifiers with spaces)</i></span></td></tr> <tr><th>Date</th><td><input type="text" name="dt0" value="" title="Date and time of the LATEST report to return. Leave blank for the most recent"/> <span style="font-size:8pt;color:darkgray;"><i>E.g.:</i> 15:00 21 Nov <i>or</i> 2008-11-21 15:00 <i>or</i> now <i>(optional)</i></span></td></tr> <tr><th>Count</th><td><select name="c" title="Number of reports to return"><option value="1">1</option> <option value="5">5</option> <option value="10">10</option> <option value="20">20</option> <option value="30">30</option> <option value="40">40</option> <option value="50">50</option> <option value="100">100</option> </select> <span style="font-size:8pt;color:darkgray;"><i>Number of reports to retrieve for each identifier</i></span></td></tr> <tr><th>Type</th><td><select name="rt" title="Report type"><option value="metar">METAR</option><option value="taf">TAF</option></select></td></tr> <tr><th></th><td><input type="submit" value="Search" accesskey="S" title="Accesskey: 'S'"/></td></tr> </table> </form> </p> <script> el = document.getElementById('aero.metar.search'); el.elements[0].focus(); </script> <p style="font-weight:bold;">Retrieve METAR and TAF information <a href="email" title="METAR and TAF By Email">via email</a>.</p> <p>The earliest records in this archive date from 2008-11-06 12:00 UTC</p> <p style="font-style:italic;"><b>Please note:</b> Due to a modification of the underlying database engine, reports older than about two weeks at times might be unreachable. In that case, you may use the <a href="/contact">contact form</a> to drop me an email with the details of your query and I'll be happy to retrieve the requested data from offline storage and mail it back to you.</p> <p style="font-style:italic;"><b>Thinking of using a <a href="http://foldoc.org/bot">bot</a>?</b> Don't. You will get blocked. Use the <a href="/nwxs/doc/desc">NWX Service <abbr title="Application Program Interface">API</abbrv></a> instead.</p> <!--- Main content Ends Here ---> </div><div id="googleads.bottom"><script type="text/javascript"><!-- google_ad_client = "pub-0968849576395715"; /* 728x15, created 9/17/08 */ google_ad_slot = "9180212476"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div></div> <div id="footer"> <p>Copyright © 2014 <a href="/contact">Diego Berge</a><br/> Hosting by <a href="http://www.gandi.net/">Gandi.net</a></p> </div> </body> </html>
L'application doit fournir le code ICAO, la date et heure les autres champs restent sans modification.
Elle doit récupérer le texte se trouvant sous la ligne horizontale.
Je joins également une screen de la page avec le texte à récupérer en bas (EDDK 110550Z 34006KT 6000 FEW005 BKN007 BKN012 17/16 Q1013 TEMPO 4000 BR BKN004)
Merci de votre aide précieuse.
Cordialement
Pierre
Partager