Autor Beitrag
neojones
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Mi 30.07.03 14:15 
Hallo,

ich muss ein Tool schreiben, das von einer Webseite alle Bilder herunterläd. D.h. ich rufe zuerst die index.html auf, muss die nach Links auf weitere Dateien absuchen, dann aus ser index.html alle Bilder rauslesen mit http get runterladen. Dann alle weiteren Links absuchen und dort auch alle Bilder herunterladen. Der ganze Spass geht bis zu 5 Ebenen.

Problem dabei ist: Die Daten sind meistens in relativen Pfaden gespeichert.

Gibts dafür ne relativ einfach Möglichkeit oder muss ich mir tatsächlich jeweils mit Schleifen alle href's und img's raussuchen und manuell verfolgen? Das wäre nämlich ein ziemlier Act, wenn man da die relativen Pfade noch aufschlüsseln muss in absolute Pfade.

Es gibt zwar vorgefertigte Tools für so was, aber unser Server hat den Apache nicht auf Port 80 laufen (Is eh so ne geile KOnfiguration *g*)

Viele Grüße,

Matthias

_________________
Ha! Es compiliert! Wir können ausliefern!
Jakyll
Hält's aus hier
Beiträge: 12



BeitragVerfasst: Mi 30.07.03 17:42 
Ich glaub ich versteh dein problem nicht so ganz...
Ein realtiver Pfad ist doch die referenz zur basisurl. Also hängste einfache den relativen Pfad hinter die Adresse wo du dich gerade befindest..

Oder seh ich da was falsch??
neojones Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Mi 30.07.03 17:47 
Richtig. Allerdings muss man bei 5 Ebenen bedenken, dass man bis zu 5 Basispfade hat bzw. einen Basispfad und dann in 4 Ebenen relative Pfade, die aneinandergehängt werden.

Meine Frage bezog sich eher darauf: Wie realisiert man das am einfachsten?

_________________
Ha! Es compiliert! Wir können ausliefern!
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 30.07.03 17:56 
ich hab hier mal im forum eine schöne kompo gefunden, die hat dir das HTML file geparst und dir sämtliche Tags rausgezogen und das dann als abslute und relative URL zurückgegeben. ich such mal.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 30.07.03 17:59 
gefunden !!!

www.jazarsoft.com/products.php

das nennt sich HTML Parser !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
neojones Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Mi 30.07.03 18:25 
@matze: Perfekt! Genau das, was ich gesucht habe!!!

Super!!

Viele Grüße,

Matthias

_________________
Ha! Es compiliert! Wir können ausliefern!
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Do 31.07.03 13:57 
Meines wissens nach geht das ganze aber auch so. www.hardtware.de/ima...es/../images/bla.jpg
neojones Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Do 31.07.03 14:30 
Schon, aber da müsste man dann auch immer Basispfade ermitteln.

Ich habs jetzt hinbekommen. Danke für eure Hilfe!

Viele Grüße,

Matthias

_________________
Ha! Es compiliert! Wir können ausliefern!