At least i have tried something here is the try

But still cant get the output and no response

HTML Part to Scrap

<div id="g_1_UFOgEYGu" class="event__match event__match--withRowLink e +vent__match--static event__match--twoLine" data-event-row="true"> <a href="https://www.flashscore.com/match/football/UFOgEYGu/#/matc +h-summary" target="_self" rel="nofollow" class="eventRowLink" aria-de +scribedby="g_1_UFOgEYGu" title="Click for match detail!"></a> <span class="event__check--hidden"></span> <div class="event__time">12.05. 17:00</div> <div class="wcl-participant_7lPCX event__homeParticipant" data-tes +tid="wcl-matchRow-participant"> <img data-testid="wcl-participantLogo" data-size="XXS" class=" +wcl-assetContainer_ZFzzG wcl-logo_EkYgo wcl-sizeXXS_-SmAO" alt="Brigh +ton" loading="lazy" src="https://static.flashscore.com/res/image/data +/G0q9xjRq-b92lfEJC.png" /> <span class="wcl-simpleText_Asp-0 wcl-scores-simpleText-01_pV2 +Wk wcl-name_3y6f5" data-testid="wcl-scores-simpleText-01">Brighton</s +pan> </div> <div class="wcl-participant_7lPCX event__awayParticipant" data-tes +tid="wcl-matchRow-participant"> <img data-testid="wcl-participantLogo" data-size="XXS" class="wcl-assetContainer_ZFzzG wcl-logo_EkYgo wcl-sizeXXS +_-SmAO" alt="Manchester City" loading="lazy" src="https://static.flashscore.com/res/image/data/0vgscFU0 +-lQuhqN8N.png" /> <strong class="wcl-simpleText_Asp-0 wcl-scores-simpleText-01_p +V2Wk wcl-bold_roH-0 wcl-name_3y6f5" data-testid="wcl-scores-simpleTex +t-01">Manchester City</strong> </div> <span class="wcl-matchRowScore_jcvjd wcl-isFinal_Am7cC event__scor +e event__score--home" data-testid="wcl-matchRowScore" data-state="fin +al" data-highlighted="false" data-side="1">1</span> <span class="wcl-matchRowScore_jcvjd wcl-isFinal_Am7cC event__scor +e event__score--away" data-testid="wcl-matchRowScore" data-state="fin +al" data-highlighted="false" data-side="2">4</span> </div>

Full code

#!/usr/bin/perl use Mojo::UserAgent; use Mojo::DOM; my $ua = Mojo::UserAgent->new; my $res = $ua->get('https://www.flashscore.com/football/england/premie +r-league-2018-2019/results/')->result; if ($res->is_success) { my $dom = Mojo::DOM->new($res->body); my @matches = $dom->find('div.event__match event__match--withRowLi +nk event__match--static event__match--twoLine')->each; # Iterate through the event__match event__match--withRowLink even +t__match--static event__match--twoLine and extract text foreach my $results (@matches) { my $Time = $results->find('div.event_ _time')->map('text')->jo +in; my $teamA = $results->find('div.wcl-participant_7lPCX event__h +omeParticipant')->map('text')->join; my $teamB = $results->find('div.wcl-participant_7lPCX event__a +wayParticipant')->map('text')->join; my $teamA_Scores = $results->find('span.wcl-matchRowScore_jcvj +d wcl-isFinal_Am7cC event__score event__score--home')->map('text')->j +oin; my $teamB_Scores = $results->find('span.wcl-matchRowScore_jcvj +d wcl-isFinal_Am7cC event__score event__score--away')->map('text')->j +oin; print "$teamA : $teamA_Scores: $Time"; print "$teamB : $teamB_Scores: $Time"; } } else { print "Cannot parse the result. " . $res->message . "n"; }

In reply to Re^2: Web scraping by joyfedl
in thread Web scrapping by joyfedl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.