Changeset 42 for trunk/Modules/Meet/Import/Vavruska.php
- Timestamp:
- Sep 17, 2019, 10:13:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/Import/Vavruska.php
r37 r42 8 8 $Content = file_get_contents($this->URL); 9 9 10 $BlockStart = '< table class="seznamka">';11 $BlockEnd = '< hr class="welt_bottom" />';10 $BlockStart = '<h2 class="wow fadeIn">Aktuální inzeráty</h2>'; 11 $BlockEnd = '<div class="clearfix"></div>'; 12 12 $Content = GetTextBetween($Content, $BlockStart, $BlockEnd); 13 13 if ($Content == '') … … 17 17 } 18 18 19 $ItemStart = '< tr class="spc">';20 $ItemEnd = '</table>21 </td></tr>';19 $ItemStart = '<div class="col-sm-12">'; 20 $ItemEnd = "</div>\n". 21 ' </div>'; 22 22 while (strpos($Content, $ItemStart) !== false) 23 23 { … … 25 25 $MeetItem = new MeetItem(); 26 26 27 $MeetItem->Time = MysqlDateTimeToTime(trim(GetTextBetween($Item, 'přidáno:', '</i>'))); 28 $MeetItem->Gender = trim(GetTextBetween($Item, '<img src=/design/', 'alt="avatar"')); 29 if ($MeetItem->Gender == 'avatar_m_03.png') $MeetItem->Gender = Gender::Male; 30 else $MeetItem->Gender = Gender::Female; 31 $MeetItem->Name = trim(GetTextBetween($Item, 'Jméno:</td><td>', '</td>')); 32 $MeetItem->Email = DecodeHtmlEnt(trim(GetTextBetween($Item, 'Kontakt:</td><td>', '</td>'))); 33 $MeetItem->Message = trim(GetTextBetween($Item, 'Text:</td><td>', '</td>')); 27 $MeetItem->Gender = GetTextBetween($Item, '<h5 class="', '"'); 28 if ($MeetItem->Gender == 'muz') $MeetItem->Gender = Gender::Male; 29 else if ($MeetItem->Gender == 'zena') $MeetItem->Gender = Gender::Female; 30 else $MeetItem->Gender = Gender::Undefined; 31 $MeetItem->Name = GetTextBetween($Item, '>', '<'); 32 $MeetItem->Email = GetTextBetween($Item, '<p>', '</p>'); 33 $MeetItem->Time = HumanDateToTime(trim(GetTextBetween($Item, '<p class="pridano">Přidáno:', '</p>'))); 34 $MeetItem->Message = trim(GetTextBetween($Item, '<p class="text">', '</p>')); 34 35 $MeetItem->Phone = ''; 35 36 $MeetItem->Height = GetHeightFromText($MeetItem->Message); … … 39 40 $MeetItem->Database = $this->Database; 40 41 $MeetItem->Source = $this->Id; 42 if ($MeetItem->Name == 'Nový Design Inzerátů') continue; 41 43 $this->AddedCount += $MeetItem->AddIfNotExist(); 42 44 }
Note:
See TracChangeset
for help on using the changeset viewer.