Changeset 11 for trunk/Import/Amblar.php


Ignore:
Timestamp:
Aug 26, 2018, 8:53:55 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Updated parsing of Astra website.
  • Fixed: Correctly parse Amblar date.
  • Added: Allow to update only one meet source by specified id.
  • Added: Show RSS link with RSS icon under meet table.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Import/Amblar.php

    r10 r11  
    2828  function Import()
    2929  {
    30     echo('Parsing '.$this->Name.'...</br>');
     30    parent::Import();
    3131    $Content = file_get_contents($this->URL);
    3232
     
    5353        else $MeetItem->Gender = Gender::Male;
    5454      $MeetItem->Name = trim(GetTextBetween($Item, '<span class="dwqa-author">', '</span>'));
    55       $MeetItem->Date = HumanDateToTime(trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>')));
     55      $MeetItem->Date = trim(GetTextBetween($Item, '<span class="dwqa-date">', '</span>'));
     56      if ($MeetItem->Date == 'před 1 dní') $MeetItem->Date = strtotime("-1 days");
     57        else $MeetItem->Date = HumanDateToTime($MeetItem->Date);
    5658      $MeetItem->Email = '';
    5759      $MeetItem->Message = '';
     
    6466      $MeetItem->Source = $this->Id;
    6567      $this->ImportItem($MeetItem);
    66       $MeetItem->AddIfNotExist();
     68      $this->AddedCount += $MeetItem->AddIfNotExist();
    6769    }
    6870  }
Note: See TracChangeset for help on using the changeset viewer.