Changeset 57 for trunk/Modules/Meet/Import
- Timestamp:
- May 27, 2020, 8:04:56 PM (5 years ago)
- Location:
- trunk/Modules/Meet/Import
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/Import/Amblar.php
r41 r57 29 29 { 30 30 $Output = parent::Import(); 31 $this->AddTimeInterval = 24 * 60 * 60; 31 32 $Content = file_get_contents($this->URL); 32 33 … … 56 57 if ($Type == 'odpovězeno') continue; 57 58 $MeetItem->Time = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>')); 58 if (mb_substr($MeetItem->Time, 0, 4) == 'před') 59 { 59 if (mb_substr($MeetItem->Time, 0, 4) == 'před') 60 { 60 61 $Parts = explode(' ', $MeetItem->Time); 61 62 if ($Parts[2] == 'hours') $MeetItem->Time = strtotime("-".$Parts[1]." hours"); … … 73 74 $MeetItem->Source = $this->Id; 74 75 $Output .= $this->ImportItem($MeetItem); 75 $this-> AddedCount += $MeetItem->AddIfNotExist(24 * 60 * 60);76 $this->MeetItems[] = $MeetItem; 76 77 } 77 78 return $Output; -
trunk/Modules/Meet/Import/AstraPraha.php
r37 r57 39 39 $MeetItem->Database = $this->Database; 40 40 $MeetItem->Source = $this->Id; 41 $this-> AddedCount += $MeetItem->AddIfNotExist();41 $this->MeetItems[] = $MeetItem; 42 42 } 43 43 return $Output; -
trunk/Modules/Meet/Import/Csts.php
r37 r57 45 45 $MeetItem->Database = $this->Database; 46 46 $MeetItem->Source = $this->Id; 47 $this-> AddedCount += $MeetItem->AddIfNotExist();47 $this->MeetItems[] = $MeetItem; 48 48 } 49 49 return $Output; -
trunk/Modules/Meet/Import/Ella.php
r45 r57 6 6 { 7 7 $Output = parent::Import(); 8 $this->AddCompareTime = false; 9 $this->AddCompareRemoteId = true; 8 10 $Content = file_get_contents($this->URL); 9 11 … … 38 40 $MeetItem->Database = $this->Database; 39 41 $MeetItem->Source = $this->Id; 40 $this-> AddedCount += $MeetItem->AddIfNotExist(0, false, true);42 $this->MeetItems[] = $MeetItem; 41 43 } 42 44 return $Output; -
trunk/Modules/Meet/Import/Eso.php
r37 r57 29 29 if (strpos($MeetItem->Gender, 'partnerku') !== false) $MeetItem->Gender = Gender::Male; 30 30 else if (strpos($MeetItem->Gender, 'partnera') !== false) $MeetItem->Gender = Gender::Female; 31 else $MeetItem->Gender = Gender::Undefined; 31 else $MeetItem->Gender = Gender::Undefined; 32 32 $Small = GetTextBetween($Item, '<small>', '</small>'); 33 if (strpos($Small, '/') != false){ 34 $MeetItem->Location = substr(trim(substr($Small, 0, strpos($Small, '/') - 1)), 1, -1); 35 $Small = substr($Small, strpos($Small, '/') + 1); 36 } 33 if (strpos($Small, '/') != false) 34 { 35 $MeetItem->Location = substr(trim(substr($Small, 0, strpos($Small, '/') - 1)), 1, -1); 36 $Small = substr($Small, strpos($Small, '/') + 1); 37 } 37 38 $MeetItem->Time = trim($Small); 38 39 $MeetItem->Time = HumanDateToTime($MeetItem->Time); 39 40 $MeetItem->Message = trim(GetTextBetween($Item, '<p class="lead">', '</p>')); 40 $MeetItem->Age = GetAgeFromText($MeetItem->Message); 41 $MeetItem->Age = GetAgeFromText($MeetItem->Message); 41 42 $MeetItem->Height = GetHeightFromText($MeetItem->Message); 42 43 $MeetItem->Weight = GetWeightFromText($MeetItem->Message); … … 49 50 $MeetItem->Database = $this->Database; 50 51 $MeetItem->Source = $this->Id; 51 $this-> AddedCount += $MeetItem->AddIfNotExist();52 $this->MeetItems[] = $MeetItem; 52 53 } 53 54 return $Output; -
trunk/Modules/Meet/Import/Facebook.php
r37 r57 5 5 function Import() 6 6 { 7 return; 7 return; 8 8 $Output = parent::Import(); 9 9 $Content = file_get_contents($this->URL); … … 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>')))); 38 $MeetItem->Age = GetAgeFromText($MeetItem->Message); 38 $MeetItem->Age = GetAgeFromText($MeetItem->Message); 39 39 $MeetItem->Height = GetHeightFromText($MeetItem->Message); 40 40 $MeetItem->Weight = GetWeightFromText($MeetItem->Message); … … 48 48 $MeetItem->Database = $this->Database; 49 49 $MeetItem->Source = $this->Id; 50 $this-> AddedCount += $MeetItem->AddIfNotExist();50 $this->MeetItems[] = $MeetItem; 51 51 } 52 52 return $Output; -
trunk/Modules/Meet/Import/MajkluvSvet.php
r37 r57 48 48 $MeetItem->Database = $this->Database; 49 49 $MeetItem->Source = $this->Id; 50 $this-> AddedCount += $MeetItem->AddIfNotExist();50 $this->MeetItems[] = $MeetItem; 51 51 } 52 return $Output; 52 return $Output; 53 53 } 54 54 } -
trunk/Modules/Meet/Import/SalsaDance.php
r37 r57 40 40 $MeetItem->Database = $this->Database; 41 41 $MeetItem->Source = $this->Id; 42 $this-> AddedCount += $MeetItem->AddIfNotExist();42 $this->MeetItems[] = $MeetItem; 43 43 } 44 return $Output; 44 return $Output; 45 45 } 46 46 } -
trunk/Modules/Meet/Import/Seznamka.php
r54 r57 9 9 $Content = str_replace("(adsbygoogle = window.adsbygoogle || []).push({});", "", $Content); 10 10 $BlockStart = '<h1>Tanec ... : Seznamka</h1>'; 11 $BlockEnd = ' <h2>Doporučujeme</h2>';11 $BlockEnd = 'rel=\'prev\'>Předchozí</a>'; 12 12 $Content = GetTextBetween($Content, $BlockStart, $BlockEnd); 13 13 if ($Content == '') … … 50 50 $MeetItem->Database = $this->Database; 51 51 $MeetItem->Source = $this->Id; 52 $this-> AddedCount += $MeetItem->AddIfNotExist();52 $this->MeetItems[] = $MeetItem; 53 53 } 54 54 return $Output; -
trunk/Modules/Meet/Import/TanecniSkola.php
r37 r57 5 5 function Import() 6 6 { 7 $Output = '';7 $Output = parent::Import(); 8 8 $HeightRange = array( 9 9 '< 120 cm' => 120, … … 26 26 '200 cm <' => 205, 27 27 ); 28 29 $Output = parent::Import();30 28 $Content = file_get_contents($this->URL); 31 29 … … 92 90 $MeetItem->Database = $this->Database; 93 91 $MeetItem->Source = $this->Id; 94 $this-> AddedCount += $MeetItem->AddIfNotExist();92 $this->MeetItems[] = $MeetItem; 95 93 } 96 94 } -
trunk/Modules/Meet/Import/Vavruska.php
r43 r57 41 41 $MeetItem->Source = $this->Id; 42 42 if ($MeetItem->Name == 'Nový Design Inzerátů') continue; 43 $this-> AddedCount += $MeetItem->AddIfNotExist();43 $this->MeetItems[] = $MeetItem; 44 44 } 45 45 return $Output;
Note:
See TracChangeset
for help on using the changeset viewer.