/**
  * @param ScrapeUrlEvent $event
  */
 public function onScrapeNextUrl(ScrapeUrlEvent $event)
 {
     $this->logger->debug(sprintf('⇒  next url: %s', (string) $event->getUrl()));
 }
 /**
  * @param Scraper           $scraper
  * @param string            $url
  * @param ResponseInterface $response
  */
 public function __construct(Scraper $scraper, $url, ResponseInterface $response)
 {
     parent::__construct($scraper, $url);
     $this->response = $response;
 }
Esempio n. 3
0
 /**
  * @param Scraper   $scraper
  * @param string    $url
  * @param \DateTime $retryDate
  */
 public function __construct(Scraper $scraper, $url, \DateTime $retryDate = null)
 {
     parent::__construct($scraper, $url);
     $this->retryDate = $retryDate;
 }
 /**
  * @param ScrapeUrlEvent $event
  */
 public function onScrapeNextUrl(ScrapeUrlEvent $event)
 {
     $this->queueManager->add(ScrapeUrlExecutor::NAME, [$event->getScraper()->getId(), $event->getUrl()]);
 }
 public function onScrapeNextUrl(ScrapeUrlEvent $event)
 {
     $this->output->writeln(sprintf('<options=bold>⇒  next url</>: <comment>%s</comment>', (string) $event->getUrl()));
 }