Skip to content

Commit

Permalink
Title::filmingDates()
Browse files Browse the repository at this point in the history
  • Loading branch information
jreklund committed Feb 18, 2024
1 parent 0abe4c2 commit 37ab564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Imdb/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -3110,8 +3110,8 @@ public function filmingDates()
{
if (empty($this->filmingDates)) {
$page = $this->getPage("Locations");
if (@preg_match('!sub-section-flmg_dates".*?<\/section!ims', $page, $filDates)) {
if (preg_match("/(\d+ \w+ \d{4}) - (\d+ \w+ \d{4})/", strip_tags($filDates[1]), $dates)) {
if (@preg_match('!sub-section-flmg_dates"[^>]*?>(.*?)<\/section>!ims', $page, $filDates)) {
if (preg_match("/(\w+ \d+, \d{4}) - (\w+ \d+, \d{4})/", strip_tags($filDates[1]), $dates)) {
$this->filmingDates = array(
'beginning' => date('Y-m-d', strtotime($dates[1])),
'end' => date('Y-m-d', strtotime($dates[2])),
Expand Down

0 comments on commit 37ab564

Please sign in to comment.