boucler les éléments d'une pages html

Aide et conseils concernant AutoIt et ses outils.
Règles du forum
.
Verrouillé
elsanto
Niveau 1
Niveau 1
Messages : 3
Enregistré le : sam. 06 févr. 2021 12:59
Status : Hors ligne

boucler les éléments d'une pages html

#1

Message par elsanto »

bonjour chers tous
je suis nouveau sur autoit et je rame sur un projet depuis un bout de temps; en fait je voudrai tester le contenue de tous les span qui ont la class c-bets__inner

Code : Tout sélectionner

#include <Inet.au3>

Func _StringBetween($s, $from, $to)
$x = StringInStr($s, $from) + StringLen($from)
$y = StringInStr(StringTrimLeft($s, $x), $to)
Return StringMid($s, $x, $y)
EndFunc
While(0=0)
$site="https://1xbet.cm/live/Football/"
$source=_INetGetSource($site)
;ClipPut($source)
$cote=Number(_StringBetween($source,'<span class="c-bets__inner">', '</span>'))
If $cote<=1.01 Then
	Msgbox(0,"cote",$cote )
EndIf
WEnd
voici mon code(il ne fonctionne pas)
s'il vous plaît; à l'aide :( :(
Avatar du membre
mikell
Modérateur
Modérateur
Messages : 6090
Enregistré le : dim. 29 mai 2011 17:32
Localisation : Deep Cévennes
Status : Hors ligne

Re: boucler les éléments d'une pages html

#2

Message par mikell »

"Ce site web n'est pas disponible dans votre pays" me dit méchamment la page d'accueil
Si tu veux une réponse vaudrait mieux poster carrément le code source de la page qui t'intéresse...
" L'échec est le fondement de la réussite. " (Lao-Tseu )
" Plus ça rate, plus on a de chances que ça marche " (les Shadoks )
elsanto
Niveau 1
Niveau 1
Messages : 3
Enregistré le : sam. 06 févr. 2021 12:59
Status : Hors ligne

Re: boucler les éléments d'une pages html

#3

Message par elsanto »

mikell a écrit : dim. 07 févr. 2021 07:49 "Ce site web n'est pas disponible dans votre pays" me dit méchamment la page d'accueil
Si tu veux une réponse vaudrait mieux poster carrément le code source de la page qui t'intéresse...

merci @mikell voici le code de la page; j'ai coupé une partie pour être en dessous du nombre de caractère maximale

Code : Tout sélectionner

<html lang="fr">
<head>
    <meta charset="utf-8">
    <title>Football  en ligne ⇒ Regarder aujourd'hui  Football  en streaming gratuit ⇒ Paris en directs ⇒ 1xBet</title>

</head>
<body class=" betting haveLeftMenu fixedLeft minRightSide liveLine fixedRight redhlp_online redhlp_ready has-consultant right">

                                                    <a href="live/Football/88637-England-Premier-League/282020713-Wolverhampton-Wanderers-Leicester-City/" class="c-events__name">
                            <span class="c-events__teams">
                                <span class="n"
                                      title="Wolverhampton Wanderers — Leicester City   ">
                                                                            <span class="c-events__team">Wolverhampton Wanderers </span>
                                        <span class="c-events__team">Leicester City </span>
                                                                                                          </span>
                            </span>
                        </a>
                                                    <div class="c-events-scoreboard__lines">
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                            </div>
                                            </div>
                    <div class="c-events-scoreboard__item">
                        <div class="c-events-scoreboard__subitem">
                            <div class="c-events__favorite"></div>
                            <div class="c-events__time  ">
                                                                    <span>03:19</span>
                                                                                                                                    <span class="c-events__overtime">1 Mi-temps</span>
                                                            </div>
                        </div>
                        <div class="c-events__more-wrap">
                                <a class="c-events__more c-events__more_bets js-showMoreBets">
                                    +458                                </a>
                                                            <a class="c-events__more c-events__more_events"></a>
                                                    </div>
                    </div>
                </div>
            
            <div class="c-bets">
                <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">3.6</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">3.3</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.22</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.725</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.375</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.33</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.288</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">2.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.7</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">+0-</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.6</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.97</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">1</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.84</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.34</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">1.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.6</span>
    </a>
            </div>
        </div>
    </div>

            <div class="c-events__item c-events__item_head greenBack">
            <svg class="icon">
    <g>
                                <use xlink:href="/default/img/sports-icon/icons.svg#sports_1"></use>
            </g>
</svg>            <div title="Espagne" class="c-events__lang langDT17 ldt_78">
                            </div>
            <div class="c-events__name">
                <span class="c-events__liga">
                    Espagne. La Liga                </span>
            </div>
            <div class="c-bets">
                <div class="c-bets__bet c-bets__bet_sm">1</div>
<div class="c-bets__bet c-bets__bet_sm c-bets__bet_change">X</div>
<div class="c-bets__bet c-bets__bet_sm">2</div>

    <div class="c-bets__bet c-bets__bet_sm">1X</div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change">12</div>
    <div class="c-bets__bet c-bets__bet_sm">2X</div>

<div class="c-bets__bet c-bets__bet_sm"><span>P</span></div>
<div class="c-bets__bet c-bets__bet_sm c-bets__bet_change"><span>Total</span></div>
<div class="c-bets__bet c-bets__bet_sm"><span>M</span></div>

    <div class="c-bets__bet c-bets__bet_sm"><span>1</span></div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change"><span>Handicap</span></div>
    <div class="c-bets__bet c-bets__bet_sm"><span>2</span></div>

    <div class="c-bets__bet c-bets__bet_sm">P</div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change" title="Total Individuel 1">TI1</div>
    <div class="c-bets__bet c-bets__bet_sm">M</div>

                <div class="c-bets__bet c-bets__bet_sm">P</div>
        <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change" title="Total Individuel 2">TI2</div>
        <div class="c-bets__bet c-bets__bet_sm">M</div>
                        </div>
        </div>
            <div class="c-events__item c-events__item_col">
                <div class="c-events__item c-events__item_game c-events-scoreboard__wrap">
                            <div class="c-events-scoreboard">
                    <div class="c-events-scoreboard__item">
                                                    <button data-id="282009765" class="c-events__to-top" title="TOP">
                                <svg class="top-icon">
                                    <use xlink:href="/default/img/zone-icons/icon-top.svg#Capa1"></use>
                                </svg>
                            </button>
                                                    <a href="live/Football/127733-Spain-La-Liga/282009765-Real-Sociedad-Cdiz/" class="c-events__name">
                            <span class="c-events__teams">
                                <span class="n"
                                      title="Real Sociedad — Cádiz   ">
                                                                            <span class="c-events__team">Real Sociedad </span>
                                        <span class="c-events__team">Cádiz </span>
                                                                                                          </span>
                            </span>
                        </a>
                                                    <div class="c-events-scoreboard__lines">
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                                                            <span class="c-events-scoreboard__cell c-events-scoreboard__cell--all">2</span>
                                    
                                                                                <span class="c-events-scoreboard__cell">2</span>
                                                                                        <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                                                            <span class="c-events-scoreboard__cell c-events-scoreboard__cell--all">0</span>
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                                                                        <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                            </div>
                                            </div>
                    <div class="c-events-scoreboard__item">
                        <div class="c-events-scoreboard__subitem">
                            <div class="c-events__favorite"></div>
                            <div class="c-events__time  ">
                                                                    <span>45:00</span>
                                                                                                                                    <span class="c-events__overtime">Half time</span>
                                                            </div>
                        </div>
                        <div class="c-events__more-wrap">
                                <a class="c-events__more c-events__more_bets js-showMoreBets">
                                    +257                                </a>
                                                            <a class="c-events__more c-events__more_events"></a>
                                                    </div>
                    </div>
                </div>
            
            <div class="c-bets">
                <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non  ">
        <span class="c-bets__inner">-</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">51</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">115</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non  ">
        <span class="c-bets__inner">-</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non  ">
        <span class="c-bets__inner">-</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non  ">
        <span class="c-bets__inner">-</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.784</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">3.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.15</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.17</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">-3.5+</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.77</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.89</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">3.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.91</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">4.22</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">0.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.23</span>
    </a>
            </div>
        </div>
    </div>

            <div class="c-events__item c-events__item_head greenBack">
            <svg class="icon">
    <g>
                                <use xlink:href="/default/img/sports-icon/icons.svg#sports_1"></use>
            </g>
</svg>            <div title="Italie" class="c-events__lang langDT17 ldt_79">
                            </div>
            <div class="c-events__name">
                <span class="c-events__liga">
                    Italie. Série A                </span>
            </div>
            <div class="c-bets">
                <div class="c-bets__bet c-bets__bet_sm">1</div>
<div class="c-bets__bet c-bets__bet_sm c-bets__bet_change">X</div>
<div class="c-bets__bet c-bets__bet_sm">2</div>

    <div class="c-bets__bet c-bets__bet_sm">1X</div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change">12</div>
    <div class="c-bets__bet c-bets__bet_sm">2X</div>

<div class="c-bets__bet c-bets__bet_sm"><span>P</span></div>
<div class="c-bets__bet c-bets__bet_sm c-bets__bet_change"><span>Total</span></div>
<div class="c-bets__bet c-bets__bet_sm"><span>M</span></div>

    <div class="c-bets__bet c-bets__bet_sm"><span>1</span></div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change"><span>Handicap</span></div>
    <div class="c-bets__bet c-bets__bet_sm"><span>2</span></div>

    <div class="c-bets__bet c-bets__bet_sm">P</div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change" title="Total Individuel 1">TI1</div>
    <div class="c-bets__bet c-bets__bet_sm">M</div>

                <div class="c-bets__bet c-bets__bet_sm">P</div>
        <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change" title="Total Individuel 2">TI2</div>
        <div class="c-bets__bet c-bets__bet_sm">M</div>
                        </div>
        </div>
            <div class="c-events__item c-events__item_col">
                <div class="c-events__item c-events__item_game c-events-scoreboard__wrap">
                            <div class="c-events-scoreboard">
                    <div class="c-events-scoreboard__item">
                                                    <button data-id="282020443" class="c-events__to-top" title="TOP">
                                <svg class="top-icon">
                                    <use xlink:href="/default/img/zone-icons/icon-top.svg#Capa1"></use>
                                </svg>
                            </button>
                                                    <a href="live/Football/110163-Italy-Serie-A/282020443-Milan-Crotone/" class="c-events__name">
                            <span class="c-events__teams">
                                <span class="n"
                                      title="Milan — Crotone   ">
                                                                            <span class="c-events__team">Milan </span>
                                        <span class="c-events__team">Crotone </span>
                                                                                                          </span>
                            </span>
                        </a>
                                                    <div class="c-events-scoreboard__lines">
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                            </div>
                                            </div>
                    <div class="c-events-scoreboard__item">
                        <div class="c-events-scoreboard__subitem">
                            <div class="c-events__favorite"></div>
                            <div class="c-events__time  ">
                                                                    <span>00:06</span>
                                                                                                                                    <span class="c-events__overtime">1 Mi-temps</span>
                                                            </div>
                        </div>
                        <div class="c-events__more-wrap">
                                <a class="c-events__more c-events__more_bets js-showMoreBets">
                                    +459                                </a>
                                                            <a class="c-events__more c-events__more_events"></a>
                                                    </div>
                    </div>
                </div>
            
            <div class="c-bets">
                <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.21</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">7.54</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">14</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.04</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.112</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">4.91</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.184</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">3.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.76</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.95</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">-2+</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.95</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.76</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">2.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.06</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.76</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">0.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.06</span>
    </a>
            </div>
        </div>
    </div>

            <div class="c-events__item c-events__item_col">
                <div class="c-events__item c-events__item_game c-events-scoreboard__wrap">
                            <div class="c-events-scoreboard">
                    <div class="c-events-scoreboard__item">
                                                    <button data-id="282020469" class="c-events__to-top" title="TOP">
                                <svg class="top-icon">
                                    <use xlink:href="/default/img/zone-icons/icon-top.svg#Capa1"></use>
                                </svg>
                            </button>
                                                    <a href="live/Football/110163-Italy-Serie-A/282020469-Udinese-Calcio-Hellas-Verona/" class="c-events__name">
                            <span class="c-events__teams">
                                <span class="n"
                                      title="Udinese Calcio — Hellas Verona   ">
                                                                            <span class="c-events__team">Udinese Calcio </span>
                                        <span class="c-events__team">Hellas Verona </span>
                                                                                                          </span>
                            </span>
                        </a>
                                                    <div class="c-events-scoreboard__lines">
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                            </div>
                                            </div>
                    <div class="c-events-scoreboard__item">
                        <div class="c-events-scoreboard__subitem">
                            <div class="c-events__favorite"></div>
                            <div class="c-events__time  ">
                                                                    <span>03:19</span>
                                                                                                                                    <span class="c-events__overtime">1 Mi-temps</span>
                                                            </div>
                        </div>
                        <div class="c-events__more-wrap">
                                <a class="c-events__more c-events__more_bets js-showMoreBets">
                                    +443                                </a>
                                                            <a class="c-events__more c-events__more_events"></a>
                                                    </div>
                    </div>
                </div>
            
            <div class="c-bets">
                <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.7</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">3.09</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.96</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.445</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.416</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.512</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.75</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">2</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.2</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.89</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">+0-</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.01</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.74</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">1</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.09</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.81</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">1</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.99</span>
    </a>
            </div>
        </div>
    </div>

            <div class="c-events__item c-events__item_head greenBack">
            <svg class="icon">
    <g>
                                <use xlink:href="/default/img/sports-icon/icons.svg#sports_1"></use>
            </g>
</svg>            <div title="France" class="c-events__lang langDT17 ldt_198">
                            </div>
            <div class="c-events__name">
                <span class="c-events__liga">
                    France. Ligue 1                </span>
            </div>
            <div class="c-bets">
                <div class="c-bets__bet c-bets__bet_sm">1</div>
<div class="c-bets__bet c-bets__bet_sm c-bets__bet_change">X</div>
<div class="c-bets__bet c-bets__bet_sm">2</div>

    <div class="c-bets__bet c-bets__bet_sm">1X</div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change">12</div>
    <div class="c-bets__bet c-bets__bet_sm">2X</div>

<div class="c-bets__bet c-bets__bet_sm"><span>P</span></div>
<div class="c-bets__bet c-bets__bet_sm c-bets__bet_change"><span>Total</span></div>
<div class="c-bets__bet c-bets__bet_sm"><span>M</span></div>

    <div class="c-bets__bet c-bets__bet_sm"><span>1</span></div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change"><span>Handicap</span></div>
    <div class="c-bets__bet c-bets__bet_sm"><span>2</span></div>

    <div class="c-bets__bet c-bets__bet_sm">P</div>
    <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change" title="Total Individuel 1">TI1</div>
    <div class="c-bets__bet c-bets__bet_sm">M</div>

                <div class="c-bets__bet c-bets__bet_sm">P</div>
        <div class="c-bets__bet c-bets__bet_sm c-bets__bet_change" title="Total Individuel 2">TI2</div>
        <div class="c-bets__bet c-bets__bet_sm">M</div>
                        </div>
        </div>
            <div class="c-events__item c-events__item_col">
                <div class="c-events__item c-events__item_game c-events-scoreboard__wrap">
                            <div class="c-events-scoreboard">
                    <div class="c-events-scoreboard__item">
                                                    <button data-id="282021124" class="c-events__to-top" title="TOP">
                                <svg class="top-icon">
                                    <use xlink:href="/default/img/zone-icons/icon-top.svg#Capa1"></use>
                                </svg>
                            </button>
                                                    <a href="live/Football/12821-France-Ligue-1/282021124-Montpellier-HSC-Dijon-FCO/" class="c-events__name">
                            <span class="c-events__teams">
                                <span class="n"
                                      title="Montpellier HSC — Dijon FCO   ">
                                                                            <span class="c-events__team">Montpellier HSC </span>
                                        <span class="c-events__team">Dijon FCO </span>
                                                                                                          </span>
                            </span>
                        </a>
                                                    <div class="c-events-scoreboard__lines">
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                                <div class="c-events-scoreboard__line">
                                    <span class="c-events-scoreboard__ball">
                                                                            </span>
                                    
                                    
                                                                                <span class="c-events-scoreboard__cell">0</span>
                                            
                                                                    </div>
                            </div>
                                            </div>
                    <div class="c-events-scoreboard__item">
                        <div class="c-events-scoreboard__subitem">
                            <div class="c-events__favorite"></div>
                            <div class="c-events__time  ">
                                                                    <span>03:39</span>
                                                                                                                                    <span class="c-events__overtime">1 Mi-temps</span>
                                                            </div>
                        </div>
                        <div class="c-events__more-wrap">
                                <a class="c-events__more c-events__more_bets js-showMoreBets">
                                    +457                                </a>
                                                            <a class="c-events__more c-events__more_events"></a>
                                                    </div>
                    </div>
                </div>
            
            <div class="c-bets">
                <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.72</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">3.85</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">5.24</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.19</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.296</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.225</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.86</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">2.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.05</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.21</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">-1+</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.74</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.76</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">1.5</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.06</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">2.04</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm non num ">
        <span class="c-bets__inner">1</span>
    </a>
    <a class="c-bets__bet c-bets__bet_coef c-bets__bet_sm  ">
        <span class="c-bets__inner">1.78</span>
    </a>
            </div>
        </div>
    </div>

          
                                
</html>
Avatar du membre
walkson
Modérateur
Modérateur
Messages : 911
Enregistré le : ven. 12 août 2011 19:49
Localisation : Hurepoix
Status : Hors ligne

Re: boucler les éléments d'une pages html

#4

Message par walkson »

En regardant de plus près votre code, il y a des choses bizarres comme
$cote=Number(_StringBetween($source,'<span class="c-bets__inner">', '</span>'))
StringBetween() retourne un array (tableau) que vous voulez convertir en nombre !
En reprenant le code source que j'ai mis dans un TXT, voilà ce que cela donne

Code : Tout sélectionner

	$read = FileRead(@ScriptDir & "\code.txt")
	Local $aArray = _StringBetween($read, '<span class="c-bets__inner">', '</span>')
	_ArrayDisplay($aArray) ; pour voir
	For $i = 0 To UBound($aArray) - 1
		$cote = $aArray[$i]
		If $cote <= 1.01 Then
			Msgbox(0,"cote",$cote )
		EndIf
	Next
Cordialement,
Walkson
"Horas non numero nisi serenas " Le canon de midi
(Je ne compte que les heures heureuses)
Avatar du membre
mikell
Modérateur
Modérateur
Messages : 6090
Enregistré le : dim. 29 mai 2011 17:32
Localisation : Deep Cévennes
Status : Hors ligne

Re: boucler les éléments d'une pages html

#5

Message par mikell »

walkson a écrit : dim. 07 févr. 2021 16:22StringBetween() retourne un array
La version custom (antique ?) de StringBetween() en tête de son code est bien censée retourner une string mais elle est pas du tout pratique, et le reste aussi est mal fichu
Dans la solution tu aurais pu lui mettre les includes... méchant ! :mrgreen:
" L'échec est le fondement de la réussite. " (Lao-Tseu )
" Plus ça rate, plus on a de chances que ça marche " (les Shadoks )
Avatar du membre
walkson
Modérateur
Modérateur
Messages : 911
Enregistré le : ven. 12 août 2011 19:49
Localisation : Hurepoix
Status : Hors ligne

Re: boucler les éléments d'une pages html

#6

Message par walkson »

#include <String.au3>
#include <Array.au3>

Pour me faire pardonner :(
Cordialement,
Walkson
"Horas non numero nisi serenas " Le canon de midi
(Je ne compte que les heures heureuses)
elsanto
Niveau 1
Niveau 1
Messages : 3
Enregistré le : sam. 06 févr. 2021 12:59
Status : Hors ligne

Re: boucler les éléments d'une pages html

#7

Message par elsanto »

bonjour chers tous
Excuser moi de vous répondre aussi tardivement. je suis en Afrique, les coupures d'électricité et de connexion internet ne m'aide pas.
merci @Walkson et @mikell pour votre solution.
le contenue des balise s'actualise toute les 10 à 20 secondes; pour tester les nouveaux contenue des balises je suis obligé de relancer le code. alors je voudrai s'il vous plaît savoir comment recharger automatique la page à fin de pouvoir tester les contenues.
Aussi je voudrai savoir comment au lieu d'afficher le contenue qui a la bonne valeur, de plutôt cliquer dessus.
et en fin je voudrais s'il vous plaît savoir comment faire tous ceci depuis chrome car pour pouvoir cliquer sur ces éléments, il faut être connecter à connecter et mon compte à moi est ouvert sur mon chrome.
encore grand merci pour les réponses précédentes.
Avatar du membre
walkson
Modérateur
Modérateur
Messages : 911
Enregistré le : ven. 12 août 2011 19:49
Localisation : Hurepoix
Status : Hors ligne

Re: boucler les éléments d'une pages html

#8

Message par walkson »

Bonjour,
Condition d'utilisation du site 1xbet.cm, je cite
où le parieur est suspecté de l'utilisation du logiciel spécial ou des moyens techniques permettant d'automatiser le procès du placement des paris, y compris (sans se limiter à ce qui suit) : l'abus de défaillances, d'insuffisances ou d'erreurs dans notre logiciel (y compris les jeux), l'utilisation d'appareils et de logiciels tiers ou de systèmes analytiques, y compris (mais sans se limiter à ce qui suit) des logiciels qui permettent de jouer sans l'intervention humaine (par exemple, les robots) etc,
De ce fait, vous êtes contraire aux règles de ce forum et je suis obligé de verrouiller le sujet.
Je vous invite fortement à lire les règles du forum et de les respecter !
Cordialement,
Walkson
"Horas non numero nisi serenas " Le canon de midi
(Je ne compte que les heures heureuses)
Verrouillé