Page 1 of 1

[FR]recuperer les info de film a partir d'un html

Posted: 2003-01-25 10:04:47
by Guest
g fait une connerie et g perdu ma liste ( le .xml )
il me reste le html que j'avais exporter et je me demandais si il etais possible d'importer la liste a partir du html
pq y en as quand meme pour qq heure pour refaire la liste si ca ne va pas.

pour info le script que g employer pour l'exportation c'st :

Code: Select all

<html><head>
<style TYPE="text/css">
  text,body,p,div,span,th,td,ul,li { FONT-SIZE: 10pt; FONT-FAMILY: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif; color: black; background: white; }
  HR { color: black; }
  A:link { COLOR: #003399; background: white; }
  A:visited { COLOR: #003399; background: white; }
  A:hover { COLOR: #CC0000; background: white; }
  A:active { COLOR: #CC0000; background: white; }
  td.blk { color: white; background: black; border: solid; border-color: black; }
  table.blk { color: white; background: black; border: solid; border-color: black; border-width: thin; }
  table.lgt { color: black; background: white; border: solid; border-width: thin; border-color: #F5F5F5; }
  td.lgt { color: black; background: white; border: solid; border-width: thin; border-color: #F5F5F5; }
  p.title { font-size: 18pt; font-weight: bold; }
</style></head><body>
<p>Catalog created on $$DATE with <a href="http://www.ant.be.tf/moviecatalog/" target="_blank">Ant Movie Catalog</a>.</p>
<table class="blk" border="1" cellspacing="0" cellpadding="5"><tr>
<td class="blk" nowrap>Number</td>
<td class="blk" nowrap>Original Title</td>
<td class="blk" nowrap>Translated Title</td>
<td class="blk" nowrap>Size (Mb)</td>
<td class="blk" nowrap>Format</td>
<td class="blk" nowrap>Languages</td>
<td class="blk" nowrap>Subtitles</td>
</tr>$$ITEM_BEGIN<tr>
<td rowspan="2" class="lgt"><strong>$$ITEM_NUMBER $$ITEM_APPRECIATION<br>$$ITEM_PICTURE</strong></td>
<td class="lgt"><strong>$$ITEM_ORIGINALTITLE </strong></td>
<td class="lgt">$$ITEM_TRANSLATEDTITLE </td>
<td class="lgt">$$ITEM_SIZE </td>
<td class="lgt">$$ITEM_VIDEOFORMAT </td>
<td class="lgt">$$ITEM_LANGUAGES </td>
<td class="lgt">$$ITEM_SUBTITLES </td>
</tr><tr><td colspan="6" class="lgt">$$ITEM_DESCRIPTION </td></tr><tr><td colspan="7" class="blk"></td>
</tr>$$ITEM_END</table><p><strong>Total: $$TOTALMOVIES movies</strong></p></body></html>

Posted: 2003-01-25 10:24:56
by antp
Il "suffit" de faire un script pour récupérer les infos
C'est donc tout à fait faisable, ça demande juste de prendre le temps de faire le script.
Il faut ajouter le nombre de films vides correspondant au nombre de films dans le .html
Ensuite charger le fichier dans un TStringList (LoadFromFile), récupérer les infos, puis supprimer le premier film du .html pour que lors du passage suivant ce soit le 2e qui soit pris, etc.
Si tu ne sais pas faire le script, je peux essayer de le faire cet après-midi...