Changeset 30 for trunk/Import


Ignore:
Timestamp:
Dec 30, 2018, 10:18:54 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Wrong link parsing for seznamka.cz items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Import/Seznamka.php

    r28 r30  
    4242      $MeetItem->Date = HumanDateToTime(trim(GetTextBetween($Item, '> </a>', '</span>')));
    4343      $MeetItem->Message = trim(strip_tags(GetTextBetween($Item, 'margin-top:10px;\'>', '</div>')));
    44       $MeetItem->Link = 'https://www.seznamka.cz'.substr(GetTextBetween($Item, "<a href='", "'"), 5);
     44      $MeetItem->Link = GetTextBetween($Item, "<a href='", "'");
     45      while (substr($MeetItem->Link, 0, 3) == '../')
     46        $MeetItem->Link = substr($MeetItem->Link, 3);
     47      $MeetItem->Link = 'https://www.seznamka.cz/'.$MeetItem->Link;
    4548      $MeetItem->Email = GetEmailFromText($MeetItem->Message);
    4649      $MeetItem->Phone = '';
    4750      $MeetItem->Height = GetHeightFromText($MeetItem->Message);
    4851      $MeetItem->Weight = GetWeightFromText($MeetItem->Message);
    49 
    5052      $MeetItem->Database = $this->Database;
    5153      $MeetItem->Source = $this->Id;
Note: See TracChangeset for help on using the changeset viewer.