Example - BBC News live headlines

HTML output retrieves first article from http://news.bbc.co.uk/. Output is refreshing each 15 minutes from cron.

 

Output:

<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">Senators clash as Trump impeachment trial opens</a></h3></p>
<p>The Senate rejects Democratic attempts to obtain documents and evidence in the proceedings.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">Kate launches childhood survey to help under-fives</a></h3></p>
<p>The Duchess of Cambridge meets children in Birmingham to mark the launch of her &quot;five big questions&quot;.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">New safety code for kids&#x27; online toys and apps</a></h3></p>
<p>Future generations will be &quot;astonished&quot; to think we did not protect kids, the information commissioner says.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Troops called as record snowfall blankets Canadian province</a></h3></p>
<p>The Canadian province was hit with more than 70cm of snow in a record-breaking blizzard.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">UK told to &#x27;hold fire&#x27; on April tech tax</a></h3></p>
<p>The OECD has said the UK should wait for a global agreement on taxing technology firms.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">People still want plastic bottles, says Coca-Cola</a></h3></p>
<p>The drinks giant says it will not ditch plastic outright but will try to recycle more.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Super-rich elites making London &#x27;off-limits&#x27;</a></h3></p>
<p>Moving to London is unaffordable for those from poorer backgrounds, says social mobility report.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Dementia patients &#x27;dumped in hospital&#x27;</a></h3></p>
<p>One in 10 dementia patients spends over a month in hospital after being admitted as an emergency.</p>
<p>Time: </p>
<p>Category: Health</p>
<p><h3><a href="http://www.bbc.com">Young people&#x27;s career aspirations &#x27;disconnected&#x27;</a></h3></p>
<p>Five times as many want to work in art, entertainment and sport as there are jobs, a study suggests.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Railcard for veterans to launch on Armistice Day</a></h3></p>
<p>Former military personnel will save a third off most train fares, the government announces.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Watson advances at Australian Open</a></h3></p>
<p>Britain&#x27;s Heather Watson showed tremendous fight in blustery conditions to win her Australian Open first-round match against Czech Kristyna Pliskova.</p>
<p>Time: </p>
<p>Category: BBC Sport</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">Senators clash as Trump impeachment trial opens</a></h3></p>
<p>The Senate rejects Democratic attempts to obtain documents and evidence in the proceedings.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">Kate launches childhood survey to help under-fives</a></h3></p>
<p>The Duchess of Cambridge meets children in Birmingham to mark the launch of her &quot;five big questions&quot;.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">New safety code for kids&#x27; online toys and apps</a></h3></p>
<p>Future generations will be &quot;astonished&quot; to think we did not protect kids, the information commissioner says.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Troops called as record snowfall blankets Canadian province</a></h3></p>
<p>The Canadian province was hit with more than 70cm of snow in a record-breaking blizzard.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">UK told to &#x27;hold fire&#x27; on April tech tax</a></h3></p>
<p>The OECD has said the UK should wait for a global agreement on taxing technology firms.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">People still want plastic bottles, says Coca-Cola</a></h3></p>
<p>The drinks giant says it will not ditch plastic outright but will try to recycle more.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Super-rich elites making London &#x27;off-limits&#x27;</a></h3></p>
<p>Moving to London is unaffordable for those from poorer backgrounds, says social mobility report.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Dementia patients &#x27;dumped in hospital&#x27;</a></h3></p>
<p>One in 10 dementia patients spends over a month in hospital after being admitted as an emergency.</p>
<p>Time: </p>
<p>Category: Health</p>
<p><h3><a href="http://www.bbc.com">Young people&#x27;s career aspirations &#x27;disconnected&#x27;</a></h3></p>
<p>Five times as many want to work in art, entertainment and sport as there are jobs, a study suggests.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Railcard for veterans to launch on Armistice Day</a></h3></p>
<p>Former military personnel will save a third off most train fares, the government announces.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Watson advances at Australian Open</a></h3></p>
<p>Britain&#x27;s Heather Watson showed tremendous fight in blustery conditions to win her Australian Open first-round match against Czech Kristyna Pliskova.</p>
<p>Time: </p>
<p>Category: BBC Sport</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">Senators clash as Trump impeachment trial opens</a></h3></p>
<p>The Senate rejects Democratic attempts to obtain documents and evidence in the proceedings.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">Kate launches childhood survey to help under-fives</a></h3></p>
<p>The Duchess of Cambridge meets children in Birmingham to mark the launch of her &quot;five big questions&quot;.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">New safety code for kids&#x27; online toys and apps</a></h3></p>
<p>Future generations will be &quot;astonished&quot; to think we did not protect kids, the information commissioner says.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Troops called as record snowfall blankets Canadian province</a></h3></p>
<p>The Canadian province was hit with more than 70cm of snow in a record-breaking blizzard.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">UK told to &#x27;hold fire&#x27; on April tech tax</a></h3></p>
<p>The OECD has said the UK should wait for a global agreement on taxing technology firms.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">People still want plastic bottles, says Coca-Cola</a></h3></p>
<p>The drinks giant says it will not ditch plastic outright but will try to recycle more.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Super-rich elites making London &#x27;off-limits&#x27;</a></h3></p>
<p>Moving to London is unaffordable for those from poorer backgrounds, says social mobility report.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Dementia patients &#x27;dumped in hospital&#x27;</a></h3></p>
<p>One in 10 dementia patients spends over a month in hospital after being admitted as an emergency.</p>
<p>Time: </p>
<p>Category: Health</p>
<p><h3><a href="http://www.bbc.com">Young people&#x27;s career aspirations &#x27;disconnected&#x27;</a></h3></p>
<p>Five times as many want to work in art, entertainment and sport as there are jobs, a study suggests.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Railcard for veterans to launch on Armistice Day</a></h3></p>
<p>Former military personnel will save a third off most train fares, the government announces.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Watson advances at Australian Open</a></h3></p>
<p>Britain&#x27;s Heather Watson showed tremendous fight in blustery conditions to win her Australian Open first-round match against Czech Kristyna Pliskova.</p>
<p>Time: </p>
<p>Category: BBC Sport</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">Senators clash as Trump impeachment trial opens</a></h3></p>
<p>The Senate rejects Democratic attempts to obtain documents and evidence in the proceedings.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">Kate launches childhood survey to help under-fives</a></h3></p>
<p>The Duchess of Cambridge meets children in Birmingham to mark the launch of her &quot;five big questions&quot;.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">New safety code for kids&#x27; online toys and apps</a></h3></p>
<p>Future generations will be &quot;astonished&quot; to think we did not protect kids, the information commissioner says.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">&#x27;You are never far from a sausage roll&#x27;</a></h3></p>
<p>People who have a healthy weight are in the minority in Scotland. Why is that and what can be done?</p>
<p>Time: </p>
<p>Category: Scotland</p>
<p><h3><a href="http://www.bbc.com">Troops called as record snowfall blankets Canadian province</a></h3></p>
<p>The Canadian province was hit with more than 70cm of snow in a record-breaking blizzard.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">Troops called as record snowfall blankets Canadian province</a></h3></p>
<p>The Canadian province was hit with more than 70cm of snow in a record-breaking blizzard.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">UK told to &#x27;hold fire&#x27; on April tech tax</a></h3></p>
<p>The OECD has said the UK should wait for a global agreement on taxing technology firms.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Sister&#x27;s plea for answers over brother&#x27;s death</a></h3></p>
<p>The body of Stefan Sutherland was found on a beach in the Highlands more than a week after he disappeared in 2013.</p>
<p>Time: </p>
<p>Category: Highlands &amp; Islands</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">People still want plastic bottles, says Coca-Cola</a></h3></p>
<p>The drinks giant says it will not ditch plastic outright but will try to recycle more.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Super-rich elites making London &#x27;off-limits&#x27;</a></h3></p>
<p>Moving to London is unaffordable for those from poorer backgrounds, says social mobility report.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Dementia patients &#x27;dumped in hospital&#x27;</a></h3></p>
<p>One in 10 dementia patients spends over a month in hospital after being admitted as an emergency.</p>
<p>Time: </p>
<p>Category: Health</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">New China virus &#x27;could mutate and spread further&#x27;</a></h3></p>
<p>Health authorities have confirmed that human-to-human transmission has taken place.</p>
<p>Time: </p>
<p>Category: China</p>
<p><h3><a href="http://www.bbc.com">Senators clash as Trump impeachment trial opens</a></h3></p>
<p>The Senate rejects Democratic attempts to obtain documents and evidence in the proceedings.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">Kate launches childhood survey to help under-fives</a></h3></p>
<p>The Duchess of Cambridge meets children in Birmingham to mark the launch of her &quot;five big questions&quot;.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">New safety code for kids&#x27; online toys and apps</a></h3></p>
<p>Future generations will be &quot;astonished&quot; to think we did not protect kids, the information commissioner says.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Troops called as record snowfall blankets Canadian province</a></h3></p>
<p>The Canadian province was hit with more than 70cm of snow in a record-breaking blizzard.</p>
<p>Time: </p>
<p>Category: US &amp; Canada</p>
<p><h3><a href="http://www.bbc.com">UK told to &#x27;hold fire&#x27; on April tech tax</a></h3></p>
<p>The OECD has said the UK should wait for a global agreement on taxing technology firms.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">Earth&#x27;s oldest asteroid crater found in Australia</a></h3></p>
<p>The 2.2 billion-year-old asteroid impact may explain the end of an ice age, scientists say.</p>
<p>Time: </p>
<p>Category: Australia</p>
<p><h3><a href="http://www.bbc.com">People still want plastic bottles, says Coca-Cola</a></h3></p>
<p>The drinks giant says it will not ditch plastic outright but will try to recycle more.</p>
<p>Time: </p>
<p>Category: Business</p>
<p><h3><a href="http://www.bbc.com">Super-rich elites making London &#x27;off-limits&#x27;</a></h3></p>
<p>Moving to London is unaffordable for those from poorer backgrounds, says social mobility report.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Dementia patients &#x27;dumped in hospital&#x27;</a></h3></p>
<p>One in 10 dementia patients spends over a month in hospital after being admitted as an emergency.</p>
<p>Time: </p>
<p>Category: Health</p>
<p><h3><a href="http://www.bbc.com">Young people&#x27;s career aspirations &#x27;disconnected&#x27;</a></h3></p>
<p>Five times as many want to work in art, entertainment and sport as there are jobs, a study suggests.</p>
<p>Time: </p>
<p>Category: Family &amp; Education</p>
<p><h3><a href="http://www.bbc.com">Railcard for veterans to launch on Armistice Day</a></h3></p>
<p>Former military personnel will save a third off most train fares, the government announces.</p>
<p>Time: </p>
<p>Category: UK</p>
<p><h3><a href="http://www.bbc.com">Watson advances at Australian Open</a></h3></p>
<p>Britain&#x27;s Heather Watson showed tremendous fight in blustery conditions to win her Australian Open first-round match against Czech Kristyna Pliskova.</p>
<p>Time: </p>
<p>Category: BBC Sport</p>
<p><h3><a href="http://www.bbc.com">&#x27;I was let go from work over my mental health&#x27;</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">The four classic signs of &#x27;burnout&#x27;</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">&#x27;You can&#x27;t be at peak performance forever&#x27;</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Young people &#x27;most vulnerable&#x27; at work</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">&#x27;Sick and tired of feeling sick and tired&#x27;</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Osbourne&#x27;s &#x27;shock&#x27; diagnosis and Trump climate row</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">BBC News Channel</a></h3></p>
<p>The latest breaking and developing stories</p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">BBC Radio 5 Live</a></h3></p>
<p>Original news and exclusive interviews</p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">How fire-ravaged bush is already regenerating</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">&#x27;They call me names for playing football&#x27;</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Mission to reveal &#x27;Truths&#x27; about climate change</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Risking my life to protect Congo&#x27;s rainforest</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">These glasses are made of something we usually throw away</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Breathing life into black British history</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Can cooling patients help after a cardiac arrest?</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">What happens when we&#x27;re too old to be &#x27;useful&#x27;?</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Why campaigners want &#x27;rough sex&#x27; murder defence ban</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Holocaust row bubbles as leaders gather in Israel</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Is Veganuary a smart way to lose weight?</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>
<p><h3><a href="http://www.bbc.com">Is there still a place for &#x27;the grind&#x27; whale hunt?</a></h3></p>
<p></p>
<p>Time: </p>
<p>Category: </p>

Source code of script:

# File: bbc_main.w
# Name: BBC News live headlines
# Description: HTML output retrieves first article from www.bbcnews.com
# Input: URL [http://news.bbc.co.uk]
# Output format: HTML file
# Output fields: Source URL, Link, Title, Description

#<Logger File>
#	Global
#	FileName bbc_log.log
#	Level debug
#</Logger>

<Section>
    Name bbc_main
	
    Define $output_file bbc_output.html

	# define variable $url and assign it value
    Define $url http://www.bbc.com/news
    
	
	
    # clean output file
    <Action Print>
        FileName {$output_file}
		FileMode Write  
    </Action>
    	
	
    
    # load content
    <Action ContentURL>
        URL {$url}
        RemoveNewLine
        TagsToStrip br,nobr,b
    </Action>

	# the script will iterate through all headlines
	<Section While>
		# search for headlines only in the top part of the website
		EndAt <div class="container">
		
		# match the beginning of headline
		<Pattern>
			RegExp <div class="gs-c-promo-body
		</Pattern>
	
		<Section>
			# stop searching for date before the beginning of next headline
			EndAt <div class="gel-layout__item
	
			# match url
			<Pattern>
				RegExp <a class="gs-c-promo-heading{:re([^"]*)}" href="{$url:re([^"]*)}">
				Trim
				Compact
			</Pattern>
	
			# match title
			<Pattern>
				RegExp <h3 class="gs-c-promo-heading__title{:re([^"]*)}">{$title}</h3></a>
				Trim
				Compact
			</Pattern>
	
			# match summary
			<Pattern>
				Optional
				RegExp <p class="gs-c-promo-summary{:re([^"]*)}">{$summary}</p>
				Trim
				Compact
			</Pattern>
	
			# match time
			<Pattern>
				Optional
				RegExp <time class="gs-o-bullet__text date qa-status-date" datetime="{$time:re([^"]*)}"
				Trim
				Compact
			</Pattern>
	
			# match category
			<Pattern>
				Optional
				RegExp <span aria-hidden="true">{$category}</span>
				Trim
				Compact
			</Pattern>
	
			# and print parsed data
			<Action Print>
				FileName {$output_file}
				Text <p><h3><a href="http://www.bbc.com{$link}">{$title}</a></h3></p>\n<p>{$summary}</p>\n<p>Time: {$time}</p>\n<p>Category: {$category}</p>\n
			</Action>
        </Section>
    </Section>
</Section>

Main bbc_main