Skip to content

Instantly share code, notes, and snippets.

@nsanden
Created October 4, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsanden/7a82771918a94dc3bea941b902cdabdf to your computer and use it in GitHub Desktop.
Save nsanden/7a82771918a94dc3bea941b902cdabdf to your computer and use it in GitHub Desktop.
if (preg_match('~class="campaign_stats__value">([0-9,]+)</div>~Um', $this->crawler->html(), $match))
{
return trim($match[1]);
}
if(preg_match('~class="js-amount-ordered">([0-9]+)</span>~Uim', $this->crawler->html(), $match))
{
return trim($match[1]);
}
if(preg_match('~persistent_timer__order_count">([0-9,]+) sold, <span~Um', $this->crawler->html(), $match))
{
return trim(str_replace(',', '', $match[1]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment