Giter VIP home page Giter VIP logo

Comments (5)

Wiejeben avatar Wiejeben commented on May 25, 2024 2

Thanks for your quick response! It appeared I did not have the socket PHP extension enabled in my setup. Apparently on my laptop PHP runs different versions on console and web.

from notifier.

MatviiB avatar MatviiB commented on May 25, 2024 1

I released new version this night. Please migrate to it. Read readme. Thanks

from notifier.

DmitrySkibitsky avatar DmitrySkibitsky commented on May 25, 2024
<?php
namespace App\Parser;

use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriverBy;
use MatviiB\Notifier\Events\Notify;
use Symfony\Component\DomCrawler\Crawler;

class MannFilterDriver {
    ...
    public function __construct($url) {
       ...
        $this->driverVisitPage();
        $this->driverSetSourcePage();
        $this->productDirectoryName();
    }

   ...
    private function driverVisitPage() {
        $this->driver->get($this->url);
        $this->driverWait('className', 'inTabContent');
        $this->createCrawler($this->source_page);
    }

    private function driverWait($method, $identification, $count = 0) {
        $this->driver->wait()->until(
            function () use ($method, $identification, $count) {
                $elements = $this->driver->findElements(WebDriverBy::$method($identification));
                $message = date('Y-m-d H:i:s')." | Ожидание | [{$identification}] Найдено: ".count($elements);
                event(new Notify(['message' => $message], '/admin/mann_filter/job'));
                return count($elements) > $count;
            }
        );
        $this->driverSetSourcePage();
    }

    ....
}

from notifier.

Wiejeben avatar Wiejeben commented on May 25, 2024

I can't find the solution in the README. I'm having the same issue calling the event from my controller.

from notifier.

MatviiB avatar MatviiB commented on May 25, 2024

@Wiejeben what Laravel version do you have?

from notifier.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.