Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] PHP simple dom parser NIE parsuje całej strony
boddah85
post
Post #1





Grupa: Zarejestrowani
Postów: 72
Pomógł: 4
Dołączył: 31.07.2006

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


Witam

Chciałbym wyciągnąć statystyki zawodników ze strony http://www.whoscored.com/Teams/52
Do tego celu zamierzam użyć php simple dom parser. Niestety w wyniku otrzymuję wszystko poza interesującą mnie tabelką.
  1. <?php
  2. include('dom/simple_html_dom.php');
  3. $html = file_get_html('http://www.whoscored.com/Teams/52');
  4. echo $html->plaintext;
  5. ?>


I w efekcie dostaje (ucięte do fragmentu, który mnei interesuje)
Kod
Overall Home Away R Name Pos Age cm kg Apps Goal A Yel Red SpG PS% AW MoM Rt *Players shaded are players who are not currently active in team. (Loaned, sold, etc..) Tournaments: Premier LeagueUEFA Champions LeagueFA CupLeague Cup View: Overall Home Away R Name Pos Age cm kg Apps Tackle I F OW Clr Drb BS OG Rt *Players shaded are players who are not currently active in team. (Loaned, sold, etc..) Tournaments: Premier LeagueUEFA Champions LeagueFA CupLeague Cup View: Overall Home Away R Name Pos Age cm kg Apps G A SpG KP Drb F Off Dis Trn Rt *Players shaded are players who are not currently active in team. (Loaned, sold, etc..) Tournaments: Premier LeagueUEFA Champions LeagueFA CupLeague Cup View: Overall Home Away R Name Pos Age cm kg Apps A KP Avg P PS% C LB TB Rt *Players shaded are players who are not currently active in team. (Loaned, sold, etc..)


Z góry dzięki za pomoc.

Ten post edytował boddah85 15.03.2013, 10:43:28
Go to the top of the page
+Quote Post
!*!
post
Post #2





Grupa: Zarejestrowani
Postów: 4 298
Pomógł: 447
Dołączył: 16.11.2006

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


Wszystko jest ok. Wyniki na tej stronie są pobierane w JS, musisz zrobić do nich odwołanie, a nie do strony.
Go to the top of the page
+Quote Post
boddah85
post
Post #3





Grupa: Zarejestrowani
Postów: 72
Pomógł: 4
Dołączył: 31.07.2006

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


Jako że mam nikłe doświadczenie z parsowaniem stron, mógłbym prosić o podpowiedź jak się za to zabrać ?
Go to the top of the page
+Quote Post
!*!
post
Post #4





Grupa: Zarejestrowani
Postów: 4 298
Pomógł: 447
Dołączył: 16.11.2006

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


W przeglądarkach masz narzędzia developera. Firebug firefox, dragonfly opera itp. sprawdź połączenia do skryptu.
Go to the top of the page
+Quote Post

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: 25.08.2025 - 14:50