Changeset 31 for trunk/Import
- Timestamp:
- Dec 30, 2018, 7:37:55 PM (6 years ago)
- Location:
- trunk/Import
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Import/Amblar.php
r20 r31 55 55 $Type = trim(GetTextBetween($Item, ' ', ' ')); 56 56 if ($Type == 'odpovězeno') continue; 57 $MeetItem-> Date = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>'));58 if (mb_substr($MeetItem-> Date, 0, 4) == 'před')57 $MeetItem->Time = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>')); 58 if (mb_substr($MeetItem->Time, 0, 4) == 'před') 59 59 { 60 $Parts = explode(' ', $MeetItem-> Date);61 if ($Parts[2] == 'hours') $MeetItem-> Date = strtotime("-".$Parts[1]." hours");62 else if ($Parts[2] == 'dní') $MeetItem-> Date = strtotime("-".$Parts[1]." days");63 else if ($Parts[2] == 'dny') $MeetItem-> Date = strtotime("-".$Parts[1]." days");64 } else $MeetItem-> Date = HumanDateToTime($MeetItem->Date);60 $Parts = explode(' ', $MeetItem->Time); 61 if ($Parts[2] == 'hours') $MeetItem->Time = strtotime("-".$Parts[1]." hours"); 62 else if ($Parts[2] == 'dní') $MeetItem->Time = strtotime("-".$Parts[1]." days"); 63 else if ($Parts[2] == 'dny') $MeetItem->Time = strtotime("-".$Parts[1]." days"); 64 } else $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time.' '.HumanTime(time())); 65 65 $MeetItem->Email = ''; 66 66 $MeetItem->Message = ''; -
trunk/Import/AstraPraha.php
r26 r31 23 23 $Item = GetTextBetween($Content, $ItemStart, $ItemEnd); 24 24 $MeetItem = new MeetItem(); 25 $MeetItem-> Date = trim(GetTextBetween($Item, 'Vloženo:', '</p>'));26 $MeetItem-> Date = HumanDateToTime($MeetItem->Date);25 $MeetItem->Time = trim(GetTextBetween($Item, 'Vloženo:', '</p>')); 26 $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time.' '.HumanTime(time())); 27 27 28 28 $MeetItem->Gender = trim(GetTextBetween($Item, '<h3 class=\'dating-heading\'>', '</h3>')); -
trunk/Import/Csts.php
r26 r31 29 29 else $MeetItem->Gender = Gender::Undefined; 30 30 $MeetItem->Name = trim(html_entity_decode(GetTextBetween($Item, 'Vložil/a', ','))); 31 $MeetItem-> Date = trim(GetTextBetween($Item, ' ', '</th>'));32 $MeetItem-> Date = HumanDateTimeToTime($MeetItem->Date);31 $MeetItem->Time = trim(GetTextBetween($Item, ' ', '</th>')); 32 $MeetItem->Time = HumanDateTimeToTime($MeetItem->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/Import/Eso.php
r23 r31 35 35 $Small = substr($Small, strpos($Small, '/') + 1); 36 36 } 37 $MeetItem-> Date = trim($Small);38 $MeetItem-> Date = HumanDateTimeToTime($MeetItem->Date);37 $MeetItem->Time = trim($Small); 38 $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time.' '.HumanTime(time())); 39 39 $MeetItem->Message = trim(GetTextBetween($Item, '<p class="lead">', '</p>')); 40 40 $MeetItem->Age = GetAgeFromText($MeetItem->Message); -
trunk/Import/Facebook.php
r23 r31 32 32 else $MeetItem->Gender = Gender::Undefined; 33 33 $MeetItem->Name = trim(html_entity_decode(GetTextBetween($Item, '<span class="_39_n">', '</span>'))); 34 $MeetItem-> Date = trim(GetTextBetween($Item, ' ', '</th>'));35 $MeetItem-> Date = HumanDateTimeToTime($MeetItem->Date);34 $MeetItem->Time = trim(GetTextBetween($Item, ' ', '</th>')); 35 $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time); 36 36 $MeetItem->Height = trim(GetTextBetween($Item, "výška:", 'cm')); 37 37 $MeetItem->Message = trim(html_entity_decode(strip_tags(GetTextBetween($Item, 'data-ft="{"tn":"K"}">', '</div>')))); -
trunk/Import/MajkluvSvet.php
r14 r31 42 42 $MeetItem->Email = trim(substr($MeetItem->Email, strpos($MeetItem->Email, '|') + 1)); 43 43 } else $MeetItem->Phone = ''; 44 $MeetItem-> Date = trim(GetTextBetween($Item, "<span id='datum1", '</span>'));45 $MeetItem-> Date = substr($MeetItem->Date, strpos($MeetItem->Date, '>') + 1);46 $MeetItem-> Date = HumanDateTimeToTime($MeetItem->Date);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); 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/Import/SalsaDance.php
r11 r31 22 22 $Item = GetTextBetween($Content, $ItemStart, $ItemEnd); 23 23 $MeetItem = new MeetItem(); 24 $MeetItem-> Date = trim(GetTextBetween($Item, '<span class="created">', '</span>'));25 $MeetItem-> Date = str_replace('. ', '.', $MeetItem->Date);26 if (strpos($MeetItem-> Date, 'dnes v') !== false)27 $MeetItem-> Date = str_replace('dnes v', HumanDate(time()), $MeetItem->Date);28 if (strpos($MeetItem-> Date, 'včera v') !== false)29 $MeetItem-> Date = str_replace('včera v', HumanDate(strtotime('-1 day', time())), $MeetItem->Date);30 $MeetItem-> Date = HumanDateTimeToTime($MeetItem->Date);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); 30 $MeetItem->Time = HumanDateTimeToTime($MeetItem->Time); 31 31 $MeetItem->Name = trim(GetTextBetween($Item, '<div class="comment-name">', '</div>')); 32 32 $MeetItem->Message = trim(GetTextBetween($Item, '<p>', '</p>')); -
trunk/Import/Seznamka.php
r30 r31 40 40 $MeetItem->Age = trim(str_replace('let', '', $MeetItem->Age)); 41 41 $MeetItem->Location = trim(GetTextBetween($Item, ' rel="nofollow">', '</a></span>')); 42 $MeetItem-> Date = HumanDateToTime(trim(GetTextBetween($Item, '> </a>', '</span>')));42 $MeetItem->Time = HumanDateTimeToTime(trim(GetTextBetween($Item, '> </a>', '</span>')).' '.HumanTime(time())); 43 43 $MeetItem->Message = trim(strip_tags(GetTextBetween($Item, 'margin-top:10px;\'>', '</div>'))); 44 44 $MeetItem->Link = GetTextBetween($Item, "<a href='", "'"); -
trunk/Import/TanecniSkola.php
r16 r31 47 47 { 48 48 $MeetItem = new MeetItem(); 49 $MeetItem-> Date = HumanDateToTime(trim(GetTextBetween($Item, '<h3>', '</h3>')));50 if ($MeetItem-> Date != null)49 $MeetItem->Time = HumanDateTimeToTime(trim(GetTextBetween($Item, '<h3>', '</h3>')).' '.HumanTime(time())); 50 if ($MeetItem->Time != null) 51 51 { 52 $PreviousTime = $MeetItem-> Date;53 } else $MeetItem-> Date = $PreviousTime;52 $PreviousTime = $MeetItem->Time; 53 } else $MeetItem->Time = $PreviousTime; 54 54 55 55 $Part = GetTextBetween($Item, '</strong>', '<strong>'); -
trunk/Import/Vavruska.php
r11 r31 25 25 $MeetItem = new MeetItem(); 26 26 27 $MeetItem-> Date = MysqlDateTimeToTime(trim(GetTextBetween($Item, 'přidáno:', '</i>')));27 $MeetItem->Time = MysqlDateTimeToTime(trim(GetTextBetween($Item, 'přidáno:', '</i>'))); 28 28 $MeetItem->Gender = trim(GetTextBetween($Item, '<img src=/design/', 'alt="avatar"')); 29 29 if ($MeetItem->Gender == 'avatar_m_03.png') $MeetItem->Gender = Gender::Male;
Note:
See TracChangeset
for help on using the changeset viewer.