Foundations of Python Network Programming
Chapter 11 ■ the World Wide Web 200 They can attempt to forge the cookie by clicking through the correct privacy menus in their ...
Chapter 11 ■ the World Wide Web 201 For this sample application, you can take advantage of Flask’s built-in ability to digitally ...
Chapter 11 ■ the World Wide Web 202 If this code is merely present on the page when the user was logged into the payments applic ...
Chapter 11 ■ the World Wide Web 203 Persistent Cross-Site Scripting Without the ability to set the flash message through a long ...
Chapter 11 ■ the World Wide Web 204 However, thanks to the fact that JavaScript is probably turned on in your browser, they prob ...
Chapter 11 ■ the World Wide Web 205 @app.route('/login', methods=['GET', 'POST']) def login(): username = request.form.get('user ...
Chapter 11 ■ the World Wide Web 206 As I write this, the Shellshock vulnerability has just been announced: for the past 22 years ...
Chapter 11 ■ the World Wide Web 207 • djbank/settings.py: This contains the plug-ins and configuration that govern how the ap ...
Chapter 11 ■ the World Wide Web 208 But SQLAlchemy itself does not know about HTML forms, so the programmer using a microframewo ...
Chapter 11 ■ the World Wide Web 209 def make_payment_views(payments, username): for p in payments: yield {'dollars': p.dollars, ...
Chapter 11 ■ the World Wide Web 210 The fields of the payment form, because the form gets written out as HTML and then pulled ba ...
Chapter 11 ■ the World Wide Web 211 • Pyramid: A remarkable and high-performance synthesis of the lessons learned by communit ...
Chapter 11 ■ the World Wide Web 212 Web Scraping The number of programmers who start their web programming careers by trying to ...
Chapter 11 ■ the World Wide Web 213 There are two general flavors of automation that programmers tackle. The first is where you ...
Chapter 11 ■ the World Wide Web 214 Listing 11-12 shows a modest example of a closely targeted scraper. It is designed to log in ...
Chapter 11 ■ the World Wide Web 215 def scrape_with_lxml(text): root = lxml.html.document_fromstring(text) total = 0 for li in r ...
Chapter 11 ■ the World Wide Web 216 $ pip install selenium $ python mscrape.py -s http://127.0.0.1:5000/ 125 Registration for Py ...
Chapter 11 ■ the World Wide Web 217 The other trick is to use some kind of “tidy” program, like that distributed by the W3C and ...
Chapter 11 ■ the World Wide Web 218 If you are able to get it installed, Listing 11-12 can use the library to parse the HTML ins ...
Chapter 11 ■ the World Wide Web 219 The two final links (“page5” and “page6”) appear at the bottom of the screen as the result o ...
«
6
7
8
9
10
11
12
13
14
15
»
Free download pdf