HTTP Get: Read out the News Headlines Of Today With Tasker

3

In our previous post: HTTP get: Retrieve Any Data From Any Webpage with Tasker, we showed you how you could scrape any data from any website on the Net. Now, let us have a look if you want to retrieve more data than just 1 headline as requested by our reader eelaslanie. 

For this tutorial, we will be using Autovoice & Tasker. You can also just skip the tutorial and download the profile and the end of the post. But we would strongly advise to read through the tutorial anyway.

Just like with the previous post, let us have a look at the source code. This time, we will also be using a different website as we don’t want to make that easy. But you will see the simplicity and brilliance of Tasker at the end of this post.

Let us start like we also do with an Event => Plugin => Autovoice => Recognized

The Hard Way => Command Filter => news headlines today => tick box: contains all (so we can say any sentence as long it contains the three words above, Autovoice will activate the task)

Now let us create the task:

  1. Net => HTTP Get =>

Server:Port http://www.expatica.com

Path: module/system/action/rss?type=1&ctr=48&ch=166&tag=89 (always put everything after the extension in Path)

Output file: expatica.txt

2. File => Read File =>File: expatica.txt => To Var: %expatica

3. Variable Split => Name:%expatica=> Splitter: <title><![CDATA[

4. Variable Split => Name:%expatica2 => Splitter: ]]

This is where we ended in our previous post but we don’t want 1 headline we need more. Let’s us take 5 headlines. Therefore let us copy the previous line and increase the number so we take the next headline.

5. Variable Split => Name:%expatica3 => Splitter: ]]

6. Variable Split => Name:%expatica4 => Splitter: ]]

7. Variable Split => Name:%expatica5 => Splitter: ]]

8. Variable Split => Name:%expatica6 => Splitter: ]]

9. Variable Split => Name:%expatica7 => Splitter: ]]

10. Flash => Text:
%expactica31
%expactica41
%expactica51
%expactica61
%expactica71

I’m not going to use %expactica21 as this is the title of the page and I don’t want that. Also, make sure that you have every variable on a new line.

11. Say => Text:
%expactica31
%expactica41
%expactica51
%expactica61
%expactica71

Let us know if this worked out for you or drop a comment below and we will find the solution together.

3 COMMENTS

  1. The reading of the headlines follows up too fast. There should be a pause between 2 headlines so you know a new headline has started!

Leave a Reply