mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-22 19:38:38 +00:00
[EdfPricesBrige] Update for dom change (#4675)
Co-authored-by: Florent VIOLLEAU <florent.violleau@samsic.fr>
This commit is contained in:
parent
e30698f12f
commit
b423b13bd5
@ -88,12 +88,9 @@ class EdfPricesBridge extends BridgeAbstract
|
|||||||
$tablePrices = $html
|
$tablePrices = $html
|
||||||
->find('#grille-tarifaire-et-prix-du-kwh-du-tarif-reglemente-edf-en-option-base', 0)
|
->find('#grille-tarifaire-et-prix-du-kwh-du-tarif-reglemente-edf-en-option-base', 0)
|
||||||
->nextSibling()
|
->nextSibling()
|
||||||
->nextSibling()
|
|
||||||
->nextSibling();
|
->nextSibling();
|
||||||
|
|
||||||
$prices = $tablePrices->find('.table--stripped tbody tr');
|
$prices = $tablePrices->find('.table tbody tr');
|
||||||
// last element is useless because part of another table
|
|
||||||
array_pop($prices);
|
|
||||||
|
|
||||||
// price per kWh is same for all powers
|
// price per kWh is same for all powers
|
||||||
if ($prices && count($prices) === 9) {
|
if ($prices && count($prices) === 9) {
|
||||||
@ -122,12 +119,9 @@ class EdfPricesBridge extends BridgeAbstract
|
|||||||
$tablePrices = $html
|
$tablePrices = $html
|
||||||
->find('#grille-tarifaire-et-prix-du-kwh-du-tarif-reglemente-edf-en-option-heures-pleines-heures-creuses', 0)
|
->find('#grille-tarifaire-et-prix-du-kwh-du-tarif-reglemente-edf-en-option-heures-pleines-heures-creuses', 0)
|
||||||
->nextSibling()
|
->nextSibling()
|
||||||
->nextSibling()
|
|
||||||
->nextSibling();
|
->nextSibling();
|
||||||
|
|
||||||
$prices = $tablePrices->find('.table--stripped tbody tr');
|
$prices = $tablePrices->find('.table tbody tr');
|
||||||
// last element is useless because part of another table
|
|
||||||
array_pop($prices);
|
|
||||||
|
|
||||||
// price per kWh is same for all powers
|
// price per kWh is same for all powers
|
||||||
if ($prices && count($prices) === 8) {
|
if ($prices && count($prices) === 8) {
|
||||||
@ -158,14 +152,14 @@ class EdfPricesBridge extends BridgeAbstract
|
|||||||
private function ejp(simple_html_dom $html, string $contractUri, int $power): void
|
private function ejp(simple_html_dom $html, string $contractUri, int $power): void
|
||||||
{
|
{
|
||||||
$tablePrices = $html
|
$tablePrices = $html
|
||||||
->find('#grille-tarifaire-et-prix-du-kwh-du-tarif-reglemente-edf-en-option-ejp', 0)
|
->find('#ejp', 0)
|
||||||
|
->nextSibling()
|
||||||
|
->nextSibling()
|
||||||
->nextSibling()
|
->nextSibling()
|
||||||
->nextSibling()
|
->nextSibling()
|
||||||
->nextSibling();
|
->nextSibling();
|
||||||
|
|
||||||
$prices = $tablePrices->find('.table--stripped tbody tr');
|
$prices = $tablePrices->find('.table tbody tr');
|
||||||
// last element is useless because part of another table
|
|
||||||
array_pop($prices);
|
|
||||||
|
|
||||||
// price per kWh is same for all powers
|
// price per kWh is same for all powers
|
||||||
if ($prices && count($prices) === 5) {
|
if ($prices && count($prices) === 5) {
|
||||||
@ -190,13 +184,11 @@ class EdfPricesBridge extends BridgeAbstract
|
|||||||
|
|
||||||
private function addSubscriptionPowerInfo(simple_html_dom_node $tablePrices, string $contractUri, int $power, int $numberOfPrices): void
|
private function addSubscriptionPowerInfo(simple_html_dom_node $tablePrices, string $contractUri, int $power, int $numberOfPrices): void
|
||||||
{
|
{
|
||||||
$prices = $tablePrices->find('.table--stripped tbody tr');
|
$prices = $tablePrices->find('.table tbody tr');
|
||||||
// last element is useless because part of another table
|
|
||||||
array_pop($prices);
|
|
||||||
|
|
||||||
// 7 contracts for tempo: 6, 9, 12, 15, 18, 30 and 36 kVA
|
// 8 contracts for tempo: 6, 9, 12, 15, 18, 24, 30 and 36 kVA
|
||||||
// 9 contracts for base: 3, 6, 9, 12, 15, 18, 24, 30 and 36 kVA
|
// 9 contracts for base: 3, 6, 9, 12, 15, 18, 24, 30 and 36 kVA
|
||||||
// 7 contracts for HPHC: 6, 9, 12, 15, 18, 24, 30 and 36 kVA
|
// 8 contracts for HPHC: 6, 9, 12, 15, 18, 24, 30 and 36 kVA
|
||||||
// 5 contracts for EJP: 9, 12, 15, 18 and 36 kVA
|
// 5 contracts for EJP: 9, 12, 15, 18 and 36 kVA
|
||||||
if ($prices && count($prices) === $numberOfPrices) {
|
if ($prices && count($prices) === $numberOfPrices) {
|
||||||
$powerFound = false;
|
$powerFound = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user