Learning Python Network Programming
APIs in Action Our program will be running as a daemon, polling Twitter periodically to see whether there are any new tweets for ...
Chapter 3 'since_id': This tells Twitter to only return the tweets with IDs above this value. Every tweet has a unique 64-bit i ...
APIs in Action found = True break if found: timezone = pytz.timezone(tz) time = datetime.datetime.now(timezone).strftime('%H:%M' ...
Chapter 3 This is because Twitter applies rate limits to its API, which means that our application is only allowed to make a cer ...
APIs in Action 'status': text, 'in_reply_to_status_id': reply_to_id} url = 'https://api.twitter.com/1.1./statuses/update.json' r ...
Chapter 3 This will call get_mentions() every 60 seconds and then process any new tweets that have been downloaded. If we hit an ...
APIs in Action Well, yes it would. The ideal set up is to have a main account on which you register the app, and which you can a ...
Chapter 3 You should always check a site's terms and conditions before scraping. Some websites explicitly disallow automated par ...
APIs in Action Show me the data Before we start parsing HTML, we need something to parse! Let's grab the version and codename of ...
Chapter 3 The lxml library's ElementTree implementation has been designed to be 100 percent compatible with the standard library ...
APIs in Action If we navigated to this element by using the ElementTree functions, which we have used before, then we'd end up w ...
Chapter 3 This is the simplest form of XPath expression: it searches for children of the current element that have tag names tha ...
APIs in Action The square brackets after div, [@id="content"], form a condition that we place on the elements that we're matchi ...
Chapter 3 Here, we have downloaded and parsed the web page by pulling out the text that we want with the help of XPath. We have ...
APIs in Action Using the methods that we are looking at in this chapter, it is quite straightforward to write a bot that perform ...
Chapter 3 Finally, since we may be making quite a lot of requests as we test out our fledgling clients, it's a good idea to make ...
...
Engaging with E-mails E-mail is one of the most popular ways of digital communication. Python has a rich number of built-in libr ...
Engaging with E-mails Lots of other things also happen en-route, and then the mail reaches the recipient's local e-mail gateway. ...
Chapter 4 Composing an e-mail message Let us construct the e-mail message by using classes from the email module. The email.mime ...
«
2
3
4
5
6
7
8
9
10
11
»
Free download pdf