Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> parsowanie php
qoryto
post
Post #1





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 1.07.2009
Skąd: Rzeszów

Ostrzeżenie: (0%)
-----


Witam, Mam otóż taki problem.
Kawałek kodu:
  1. $html= str_get_html($curlresult);
  2. $grab_urls = $html->find('a[class=s]');
  3. $grab_infos = $html->find('img[class=te]');
  4. $grab_vidtime = $html->find('span[class=d]');


Problem dotyczy $grab_infos. Pojaśnię:
Skrypt pobiera informacje ze strony w tym także obrazek. Wszystko działa fajnie, jednak jest problem przy pobraniu obrazka

fragment kodu z któej strony pobieram:

  1. <div class="video">
  2. <a href="/775361" title="XXX " >
  3. <img title="XXX " id="0775361" class="te lazy" data-src="http://img.ec.cdn.redtubefiles.com/_thumbs/0000775/0775361/0775361_015m.jpg" src="http://img01.redtubefiles.com/_thumbs/design/new-design/video-thumb-placeholder.gif" alt="Nubile Films - Gooey facial for petite teen " />
  4. </a>

Pobiera mi obrazek:

  1. http://img01.redtubefiles.com/_thumbs/design/new-design/video-thumb-placeholder.gif zamiast: <a href="http://img.ec.cdn.redtubefiles.com/_thumbs/0000775/0775361/0775361_015m.jpg" target="_blank">http://img.ec.cdn.redtubefiles.com/_thumbs...775361_015m.jpg</a>


Tutaj poprawiałem:

  1. $grab_infos = $html->find('img[class=te]');
  2. na:
  3. $grab_infos = $html->find('img[class=te lazy]');


i nadal nie działa. W jaki sposób pobrać str_get_html class="te lazy" data-src=" i dalszą część aby poprawną miniaturke mi skopiowało??

Pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 2.10.2025 - 17:53