Changeset 65 for trunk/Modules/Meet/Import
- Timestamp:
- Apr 19, 2022, 10:25:41 PM (3 years ago)
- Location:
- trunk/Modules/Meet/Import
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/Import/AstraPraha.php
r63 r65 23 23 $Item = GetTextBetween($Content, $ItemStart, $ItemEnd); 24 24 $MeetItem = new MeetItem(); 25 $ MeetItem->Time = trim(GetTextBetween($Item, 'Vloženo:', '</p>'));26 $MeetItem->Time = HumanDateToTime($ MeetItem->Time);25 $Time = trim(GetTextBetween($Item, 'Vloženo:', '</p>')); 26 $MeetItem->Time = HumanDateToTime($Time); 27 27 28 $ MeetItem->Gender = trim(GetTextBetween($Item, '<h3 class=\'dating-heading\'>', '</h3>'));29 if ($ MeetItem->Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male;28 $Gender = trim(GetTextBetween($Item, '<h3 class=\'dating-heading\'>', '</h3>')); 29 if ($Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male; 30 30 else $MeetItem->Gender = Gender::Female; 31 31 $MeetItem->Message = trim(strip_tags(GetTextBetween($Item, '<p class=\'last-element\'>', '</p>'))); -
trunk/Modules/Meet/Import/Csts.php
r63 r65 24 24 $MeetItem = new MeetItem(); 25 25 26 $ MeetItem->Gender = trim(html_entity_decode(GetTextBetween($Item, 'class="kategorie">', '<div')));27 if ($ MeetItem->Gender == 'Hledám partnera') $MeetItem->Gender = Gender::Female;28 else if ($ MeetItem->Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male;26 $Gender = trim(html_entity_decode(GetTextBetween($Item, 'class="kategorie">', '<div'))); 27 if ($Gender == 'Hledám partnera') $MeetItem->Gender = Gender::Female; 28 else if ($Gender == 'Hledám partnerku') $MeetItem->Gender = Gender::Male; 29 29 else $MeetItem->Gender = Gender::Undefined; 30 30 $MeetItem->Name = trim(html_entity_decode(GetTextBetween($Item, 'Vložil/a', ','))); 31 $ MeetItem->Time = trim(GetTextBetween($Item, ' ', '</th>'));32 $MeetItem->Time = HumanDateTimeToTime($ MeetItem->Time);31 $Time = trim(GetTextBetween($Item, ' ', '</th>')); 32 $MeetItem->Time = HumanDateTimeToTime($Time); 33 33 $MeetItem->Height = trim(GetTextBetween($Item, "výška:", 'cm')); 34 34 $MeetItem->Message = trim(html_entity_decode(strip_tags(GetTextBetween($Item, '<td colspan="3">', '</td>')))); -
trunk/Modules/Meet/Import/Eso.php
r63 r65 26 26 27 27 $MeetItem->Name = trim(GetTextBetween($Item, '<h3 class="panel-title tucne">', '/')); 28 $ MeetItem->Gender = trim(GetTextBetween($Item, ' ', '</h3'));29 if (strpos($ MeetItem->Gender, 'partnerku') !== false) $MeetItem->Gender = Gender::Male;30 else if (strpos($ MeetItem->Gender, 'partnera') !== false) $MeetItem->Gender = Gender::Female;28 $Gender = trim(GetTextBetween($Item, ' ', '</h3')); 29 if (strpos($Gender, 'partnerku') !== false) $MeetItem->Gender = Gender::Male; 30 else if (strpos($Gender, 'partnera') !== false) $MeetItem->Gender = Gender::Female; 31 31 else $MeetItem->Gender = Gender::Undefined; 32 32 $Small = GetTextBetween($Item, '<small>', '</small>'); … … 36 36 $Small = substr($Small, strpos($Small, '/') + 1); 37 37 } 38 $ MeetItem->Time = trim($Small);39 $MeetItem->Time = HumanDateToTime($ MeetItem->Time);38 $Time = trim($Small); 39 $MeetItem->Time = HumanDateToTime($Time); 40 40 $MeetItem->Message = trim(GetTextBetween($Item, '<p class="lead">', '</p>')); 41 41 $MeetItem->Age = GetAgeFromText($MeetItem->Message); … … 55 55 } 56 56 } 57 -
trunk/Modules/Meet/Import/MajkluvSvet.php
r63 r65 24 24 $MeetItem = new MeetItem(); 25 25 26 $ MeetItem->Gender = trim(GetTextBetween($Item, "<td class='bunka_seznamka linel' width='45' ><img src='/pages/images/", '.gif'));27 if ($ MeetItem->Gender == 'zena') $MeetItem->Gender = Gender::Male;28 else $ MeetItem->Gender = Gender::Female;26 $Gender = trim(GetTextBetween($Item, "<td class='bunka_seznamka linel' width='45' ><img src='/pages/images/", '.gif')); 27 if ($Gender == 'zena') $MeetItem->Gender = Gender::Male; 28 else $Gender = Gender::Female; 29 29 $MeetItem->Name = trim(GetTextBetween($Item, "<span class='seznamka_nadpis'><b>", '</b>')); 30 30 $MeetItem->Height = trim(GetTextBetween($Item, "výška:", 'cm')); … … 42 42 $MeetItem->Email = trim(substr($MeetItem->Email, strpos($MeetItem->Email, '|') + 1)); 43 43 } else $MeetItem->Phone = ''; 44 $ MeetItem->Time = trim(GetTextBetween($Item, "<span id='datum1", '</span>'));45 $ MeetItem->Time = substr($MeetItem->Time, strpos($MeetItem->Time, '>') + 1);46 $MeetItem->Time = HumanDateTimeToTime($ MeetItem->Time);44 $Time = trim(GetTextBetween($Item, "<span id='datum1", '</span>')); 45 $Time = substr($Time, strpos($Time, '>') + 1); 46 $MeetItem->Time = HumanDateTimeToTime($Time); 47 47 $MeetItem->Link = 'http://www.majkluvsvet.cz'.trim(GetTextBetween($Item, "<span class='linkk pravo'><a href='", "'>odkaz")); 48 48 $MeetItem->Database = $this->Database; -
trunk/Modules/Meet/Import/SalsaDance.php
r63 r65 22 22 $Item = GetTextBetween($Content, $ItemStart, $ItemEnd); 23 23 $MeetItem = new MeetItem(); 24 $ MeetItem->Time = trim(GetTextBetween($Item, '<span class="created">', '</span>'));25 $ MeetItem->Time = str_replace('. ', '.', $MeetItem->Time);26 if (strpos($ MeetItem->Time, 'dnes v') !== false)27 $ MeetItem->Time = str_replace('dnes v', HumanDate(time()), $MeetItem->Time);28 if (strpos($ MeetItem->Time, 'včera v') !== false)29 $ MeetItem->Time = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $MeetItem->Time);24 $Time = trim(GetTextBetween($Item, '<span class="created">', '</span>')); 25 $Time = str_replace('. ', '.', $Time); 26 if (strpos($Time, 'dnes v') !== false) 27 $Time = str_replace('dnes v', HumanDate(time()), $Time); 28 if (strpos($Time, 'včera v') !== false) 29 $Time = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $Time); 30 30 $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time); 31 31 $MeetItem->Name = trim(GetTextBetween($Item, '<div class="comment-name">', '</div>')); -
trunk/Modules/Meet/Import/Seznamka.php
r63 r65 25 25 $MeetItem = new MeetItem(); 26 26 //$MeetItem->Image = trim(GetTextBetween($Item, '<div', '</div>')); 27 $ MeetItem->Gender = trim(GetTextBetween($Item, "<span class=\"ipoh ", "\""));28 if ($ MeetItem->Gender == 'zena') $MeetItem->Gender = Gender::Female;29 else if ($ MeetItem->Gender == 'muz') $MeetItem->Gender = Gender::Male;30 else $ MeetItem->Gender = Gender::Undefined;27 $Gender = trim(GetTextBetween($Item, "<span class=\"ipoh ", "\"")); 28 if ($Gender == 'zena') $MeetItem->Gender = Gender::Female; 29 else if ($Gender == 'muz') $MeetItem->Gender = Gender::Male; 30 else $Gender = Gender::Undefined; 31 31 $MeetItem->Name = trim(GetTextBetween($Item, '>', '</span>')); 32 32 $MeetItem->Name = trim(strip_tags($MeetItem->Name)); … … 35 35 $MeetItem->Age = trim(str_replace('let', '', $MeetItem->Age)); 36 36 $MeetItem->Location = trim(strip_tags(GetTextBetween($Item, '<span class=\'imesto\'>', '</span>'))); 37 $ MeetItem->Time = trim(html_entity_decode(str_replace(' ', '', GetTextBetween($Item, 'TOP</a>', '</span>'))));38 if ($ MeetItem->Time == 'Včera') $MeetItem->Time = HumanDate(time() - 60*60*24);39 else if ($ MeetItem->Time == 'Dnes') $MeetItem->Time = HumanDate(time());40 $MeetItem->Time = HumanDateToTime($ MeetItem->Time);37 $Time = trim(html_entity_decode(str_replace(' ', '', GetTextBetween($Item, 'TOP</a>', '</span>')))); 38 if ($Time == 'Včera') $Time = HumanDate(time() - 60*60*24); 39 else if ($Time == 'Dnes') $Time = HumanDate(time()); 40 $MeetItem->Time = HumanDateToTime($Time); 41 41 $MeetItem->Message = trim(strip_tags(GetTextBetween($Item, '<p>', '</p>'))); 42 42 $MeetItem->Link = GetTextBetween($Item, "<a href='", "'"); -
trunk/Modules/Meet/Import/Vavruska.php
r63 r65 25 25 $MeetItem = new MeetItem(); 26 26 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;27 $Gender = GetTextBetween($Item, '<h5 class="', '"'); 28 if ($Gender == 'muz') $MeetItem->Gender = Gender::Male; 29 else if ($Gender == 'zena') $MeetItem->Gender = Gender::Female; 30 else $Gender = Gender::Undefined; 31 31 $MeetItem->Name = GetTextBetween($Item, '>', '<'); 32 32 $MeetItem->Email = GetTextBetween($Item, '<p>', '</p>');
Note:
See TracChangeset
for help on using the changeset viewer.