mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-26 03:16:33 +03:00
[RadioMelodieBridge] Fix date parsing (#2701)
The date is now correctly parsed for every month in the year (There are months mane in french that are 3 letters long
This commit is contained in:
parent
56e991122b
commit
37843e8777
1 changed files with 3 additions and 1 deletions
|
@ -56,8 +56,10 @@ class RadioMelodieBridge extends BridgeAbstract {
|
|||
|
||||
// Handle date to timestamp
|
||||
$dateHTML = $article->find('div[class=author]', 0)->children(1)->plaintext;
|
||||
preg_match('/([a-z]{4,10}[ ]{1,2}[0-9]{1,2} [\p{L}]{4,10} [0-9]{4} à [0-9]{2}:[0-9]{2})/mus', $dateHTML, $matches);
|
||||
|
||||
preg_match('/([a-z]{4,10}[ ]{1,2}[0-9]{1,2} [\p{L}]{3,10} [0-9]{4} à [0-9]{2}:[0-9]{2})/mus', $dateHTML, $matches);
|
||||
$dateText = $matches[1];
|
||||
|
||||
$timestamp = $this->parseDate($dateText);
|
||||
|
||||
$item['enclosures'] = array_merge($picture, $audio);
|
||||
|
|
Loading…
Reference in a new issue