Jump to content
Sign in to follow this  
jacq

SOLVED:Read text from site and add to gui

Recommended Posts

jacq

Welcome.

How to read the text and add it to the gui.

The program aims to find title="trwa"

Then copy the text "prog_title">Prawda czy fałsz - pogromcy mitów: James Bond - wydanie specjalne (2)

and display in gui.

16:00 <span class="bar bar_40" title="trwa"></span></th><td><a href="/tv/Prawda-Czy-Falsz-Pogromcy-Mitow-James-Bond-Wydanie-Specjalne-2-688164" class="prog_title">Prawda czy fałsz - pogromcy mitów: James Bond - wydanie specjalne (2)</a><div class="genre">serial dokumentalny</div><p class="excerpt">Adam Savage i Jamie Hyneman, eksperci od efektów specjalnych, poddają testom mity, legendy i zdarzenia uznawane za historyczne.</p></td></tr><tr class="prog cat_ser even"><th>

Edited by jacq

Share this post


Link to post
Share on other sites
somdcomputerguy

One simple way to do this using the StringInStr() and _StringBetween() functions.

#include <String.au3>

$String = '16:00 <span class="bar bar_40" title="trwa"></span></th><td><a href="/tv/Prawda-Czy-Falsz-Pogromcy-Mitow-James-Bond-Wydanie-Specjalne-2-688164" class="prog_title">Prawda czy falsz - pogromcy mitów: James Bond - wydanie specjalne (2)</a><div class="genre">serial dokumentalny</div><p class="excerpt">Adam Savage i Jamie Hyneman, eksperci od efektów specjalnych, poddaja testom mity, legendy i zdarzenia uznawane za historyczne.</p></td></tr><tr class="prog cat_ser even"><th>'

$String_Start = 'class="prog_title">'
$String_End   = '</a><div class="genre">'

If StringInStr($String, 'title="trwa"') Then
    $Array = _StringBetween($String, $String_Start, $String_End)
    ConsoleWrite($Array[0] & @LF)
EndIf
Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
somdcomputerguy

You bet. Good luck with your project.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×