Programming the Raspberry Pi™: Getting Started with Python by Simon Monk

Programming the Raspberry Pi™: Getting Started with Python by Simon Monk

Author:Simon Monk
Language: eng
Format: epub, pdf
Tags: -
Publisher: McGraw-Hill Companies
Published: 2012-10-19T00:00:00+00:00


When you run this, you will mostly get a list of products. If you really get into this kind of thing, then search for “Regular Expressions in Python” on the Internet. Regular expressions are almost a language in their own right; they are used for doing complex searches and validations of text. They are not easy to learn or use, but they can simplify tasks like this one.

What we have done here is called web scraping, and it is not ideal for a number of reasons. First of all, organizations often do not like people “scraping” their web pages with automated programs. Therefore, you may get a warning or even banned from some sites.

Second, this action is very dependent on the structure of the web page. One tiny change on the website and everything could stop working. A much better approach is to look for an official web service interface to the site. Rather than returning the data as HTML, these services return much more easily processed data, often in XML or JSON format.

If you want to learn more about how to do this kind of thing, search the Internet for “web services in Python.”



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.