Changeset 30


Ignore:
Timestamp:
Dec 30, 2018, 10:18:54 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Wrong link parsing for seznamka.cz items.
Location:
trunk
Files:
2 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;
  • trunk/index.php

    r29 r30  
    210210      '<input value="'.$_SESSION['vekdo'].'" onkeyup="'.
    211211      'if(event.keyCode!=9) upf(\'vekdo\',$(this).val(),(event.keyCode==13?0:1));" '.
    212       'id="vekdo" autocomplete="off" type="text">'.
     212      'id="vekdo" autocomplete="off" type="text"/>'.
    213213      '<div class="label-box">let</div>'.
    214214      '</div> ';
     
    401401      '</head><body>';
    402402    $Output .= $Content;
    403     $Output .= '<br/><div class="footer">Kontakt: <a href="mailto:'.$Config['Contact'].'">'.$Config['Contact'].'</a> '.
     403    $Output .= '<div></div><div class="footer">Kontakt: <a href="mailto:'.$Config['Contact'].'">'.$Config['Contact'].'</a> '.
    404404       '<a href="https://app.zdechov.net/tanec/">Zdrojový kód</a></div>';
    405405    $Output .= '</body></html>';
Note: See TracChangeset for help on using the changeset viewer.