There's more...

One of the main challenges in retrieving information from different sources is to parse the text in all cases. Some of the feeds may return information in different formats.

For instance, in our example you can see that the Reuters feed summary includes HTML information that gets rendered in the resulting email. If you have that kind of problem, you may need to process the returned data further, until it becomes consistent. This may be highly dependent on the expected quality of the resulting report. 

When developing automatic tasks, especially when dealing with multiple input sources, expect to spend a lot of time cleaning the input in a way that's consistent. But, on the other hand, find a balance and keep in mind the final recipient. If the email is to be received, for example, by yourself or an understanding teammate, you can be a little bit more permissive than in the case of an important client.

Another possibility is to increase the complexity of the match. In this recipe, the check is done with a simple in, but remember that all the techniques in Chapter 1, Let Us Begin Our Automation Journey,  including all the regular expression capabilities, are available for you to use.

This script is automatable through a cron job as described in Chapter 2, Automating Tasks Made Easy. Try to run it every week!
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.133.35