Changeset 18
- Timestamp:
- Dec 25, 2018, 11:29:38 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Import/Seznamka.php
r11 r18 24 24 $MeetItem = new MeetItem(); 25 25 //$MeetItem->Image = trim(GetTextBetween($Item, '<div', '</div>')); 26 if (strpos($Item, "return false\" class='") !== false) 27 { 28 $MeetItem->Gender = trim(GetTextBetween($Item, "return false\" class='", "'")); 29 } else 30 { 31 $MeetItem->Gender = trim(GetTextBetween($Item, '<span class="ipoh ', '"')); 32 } 33 if ($MeetItem->Gender == 'zena') $MeetItem->Gender = Gender::Female; 34 else if ($MeetItem->Gender == 'muz') $MeetItem->Gender = Gender::Male; 35 else $MeetItem->Gender = Gender::Undefined; 26 36 $MeetItem->Name = trim(GetTextBetween($Item, '>', '</span>')); 27 37 $MeetItem->Name = trim(strip_tags($MeetItem->Name)); 28 $MeetItem->Gender = trim(GetTextBetween($Item, ' rel="nofollow">', '</a></span>')); 29 if ($MeetItem->Gender == 'Tanec / Hledám partnera') $MeetItem->Gender = Gender::Female; 30 else if ($MeetItem->Gender == 'Tanec / Hledám partnerku') $MeetItem->Gender = Gender::Male; 31 else $MeetItem->Gender = Gender::Undefined; 38 $Category = trim(GetTextBetween($Item, ' rel="nofollow">', '</a></span>')); 32 39 $MeetItem->Age = trim(GetTextBetween($Item, ' rel="nofollow">', '</a></span>')); 33 40 $MeetItem->Age = trim(str_replace('let', '', $MeetItem->Age)); -
trunk/Meet.php
r13 r18 189 189 { 190 190 $Result = explode('/', $Matches[0][0]); 191 // Avoid dates in a form day/month/year 192 if ($Result[2] > 150) $Result = array('', '', ''); 191 193 } else 192 194 {
Note:
See TracChangeset
for help on using the changeset viewer.