Compare commits
15 Commits
4422e7564b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d20702f248 | |||
| 5b5f35e9ce | |||
| fb2a346804 | |||
| 2611701d53 | |||
| c61750285a | |||
| 12280c6d54 | |||
| 6853fbef46 | |||
| 29077ed6d6 | |||
| a162bb2c1f | |||
| 7d26440d0c | |||
| 45a40ae999 | |||
| 266d444922 | |||
| 24360d86b3 | |||
| 5ce8fbd444 | |||
| 82460aa727 |
@@ -1,12 +1,34 @@
|
||||
name: Push image to registry
|
||||
name: Test, build and push image to registry
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
|
||||
jobs:
|
||||
phpunit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3.0'
|
||||
- name: Cache Composer
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: composer-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
composer-
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
||||
- name: Run PHPUnit tests
|
||||
run: vendor/bin/phpunit --configuration phpunit.xml
|
||||
build-image:
|
||||
needs: phpunit-tests
|
||||
if: success() && github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
@@ -17,6 +39,13 @@ jobs:
|
||||
registry: git.matthiasg.dev
|
||||
username: ninluc
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- name: Cache Docker layers (registry-backed)
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: buildx-cache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
buildx-cache-
|
||||
- name: Build and push
|
||||
run: |
|
||||
docker build -t git.matthiasg.dev/ninluc/datbrowser:latest .
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
name: Launch the PHPunit tests
|
||||
on:
|
||||
push:
|
||||
|
||||
|
||||
jobs:
|
||||
phpunit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.1'
|
||||
- name: Install dependencies
|
||||
run: composer install
|
||||
- name: Run PHPUnit tests
|
||||
run: vendor/bin/phpunit --configuration phpunit.xml
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Browser\Jobs\EldoradoRobuxPriceSentry;
|
||||
|
||||
use App\Browser\Jobs\HellcaseBattles\EldoradoRobuxPriceNotificationBody;
|
||||
use App\Models\Job;
|
||||
use App\Notification\Notification;
|
||||
use App\Notification\Stringifiable;
|
||||
@@ -18,7 +17,7 @@ class EldoradoRobuxPriceNotification extends Notification {
|
||||
parent::__construct($jobId);
|
||||
|
||||
$this->price = $price;
|
||||
$this->threshold = Job::find($jobId)->jobInfosTable()->get('eldorado_robux_price_threshold');
|
||||
$this->threshold = floatval(Job::find($jobId)->jobInfosTable()->get('eldorado_robux_price_threshold'));
|
||||
$this->link = $link;
|
||||
|
||||
$this->setBody($this->generateBody());
|
||||
|
||||
@@ -94,11 +94,10 @@ class EldoradoRobuxPriceSentryJob extends BrowserJob implements ShouldBeUniqueUn
|
||||
$lowestPriceElement = $browser->driver->findElement(WebDriverBy::xpath('(//eld-offer-price)[2]/strong'));
|
||||
$lowestPriceText = $lowestPriceElement->getText(); // Ex: " 0,00478 € "
|
||||
$lowestPrice = $this->textToFloat($lowestPriceText);
|
||||
$lowestPrice = $lowestPrice / 1000; // Price per Robux
|
||||
//$lowestPrice = $lowestPrice / 1000; // Price per Robux
|
||||
// TODO : Look at the entire text to try to understand if it is per 1k or per single Robux
|
||||
|
||||
$threshold = $this->textToFloat($this->jobInfos->get("eldorado_robux_price_threshold"));
|
||||
dump($threshold);
|
||||
|
||||
Log::info("EldoradoRobuxPriceSentryJob: lowest price = $lowestPrice €, threshold = $threshold €");
|
||||
$this->jobRun->addArtifact(new JobArtifact([
|
||||
|
||||
@@ -209,7 +209,7 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
|
||||
// JobRun
|
||||
// Get the elements text containing class starting with giveaway-entity-prize__
|
||||
$prizeElement = $browser->driver->findElements(WebDriverBy::xpath('//div[starts-with(@class, "giveaway-entity-prize__")]'));
|
||||
$prizeElement = $browser->driver->findElements(WebDriverBy::xpath('//div[starts-with(@class, "_giveaway_")]//div[contains(@class, "_main_dv7x6_48")]'));
|
||||
// Join their text
|
||||
$prize = "";
|
||||
foreach ($prizeElement as $element) {
|
||||
|
||||
@@ -104,7 +104,7 @@ abstract class InstagramAbstractJob extends BrowserJob implements ShouldBeUnique
|
||||
$popupsTypes = [
|
||||
['//button[contains(text(), "Allow all cookies")]'], // Allow all cookies
|
||||
['//button[contains(text(), "Not Now")]', ["Popup Not Now clicked"]], // Not now
|
||||
['//button|//div[contains(text(), "OK")]', ["Popup Ok clicked"]], // OK
|
||||
['(//button|//div)[contains(text(), "OK")]', ["Popup Ok clicked"]], // OK
|
||||
];
|
||||
|
||||
foreach ($popupsTypes as $popup) {
|
||||
|
||||
@@ -451,6 +451,7 @@ Captions must:
|
||||
4. Encourage engagement relevant to the platform's algorithm (e.g., asking a question related to the joke/scene).
|
||||
5. Optionally include relevant hashtags at the end (#hashtagsOnly), chosen appropriately for the reel's content or vibe. Use common tags if no specific ones are provided, but avoid overly generic ones unless fitting.
|
||||
6. If credit information is provided in the input (e.g., `credit: twitteruser`), acknowledge it minimally within the caption text *using only that source*. Do not invent any account handles (`@`) or platform prefixes (`tt/`). Use phrases like \"Credited to...\" or simply insert the credited name if appropriate, but don't force it unless the core concept naturally includes attribution. If no credit is provided, do not mention a specific creator.
|
||||
7. Be in english.
|
||||
|
||||
**Do Not:**
|
||||
* Start captions with 'This reel...' or similar intros.
|
||||
|
||||
0
tests/Unit/.gitkeep
Normal file
0
tests/Unit/.gitkeep
Normal file
13
undetectedChromedriver/README.md
Normal file
13
undetectedChromedriver/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Selenium Undetected Standalone-Chromedriver
|
||||
|
||||
Selenium Standalone-Chromedriver with Undected-Chromedriver applied
|
||||
|
||||
## Bug
|
||||
|
||||
```txt
|
||||
Could not start a new session. Response code 500. Message: session not created: probably user data directory is already in use,
|
||||
```
|
||||
|
||||
Go into the `/home/seluser` director in the container and run `rm -rf ~/.config/google-chrome/Singleton*`
|
||||
|
||||
If it doesn't work, the log can be found in the set profile folder in the file `chrome_debug.log`
|
||||
Reference in New Issue
Block a user