GeezerVison is showing github.com — Merge pull request #132 from azmeuk/readme · lsx88so/python-readability@5a74140
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.rst +6-6Lines changed: 6 additions & 6 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,29 +15,29 @@ Installation |
15 | 15 |
|
16 | 16 | It's easy using ``pip``, just run: |
17 | 17 |
|
18 | | -:: |
| 18 | +.. code-block:: bash |
19 | 19 |
|
20 | 20 | $ pip install readability-lxml |
21 | 21 |
|
22 | 22 | Usage |
23 | 23 | ----- |
24 | 24 |
|
25 | | -:: |
| 25 | +.. code-block:: python |
26 | 26 |
|
27 | 27 | >>> import requests |
28 | 28 | >>> from readability import Document |
29 | | - |
| 29 | +
|
30 | 30 | >>> response = requests.get('http://example.com') |
31 | 31 | >>> doc = Document(response.text) |
32 | 32 | >>> doc.title() |
33 | 33 | 'Example Domain' |
34 | | - |
| 34 | +
|
35 | 35 | >>> doc.summary() |
36 | | - u'<html><body><div><body id="readabilityBody">\n<div>\n <h1>Example Domain</h1>\n |
| 36 | + """<html><body><div><body id="readabilityBody">\n<div>\n <h1>Example Domain</h1>\n |
37 | 37 | <p>This domain is established to be used for illustrative examples in documents. You may |
38 | 38 | use this\n domain in examples without prior coordination or asking for permission.</p> |
39 | 39 | \n <p><a href="http://www.iana.org/domains/example">More information...</a></p>\n</div> |
40 | | - \n</body>\n</div></body></html>' |
| 40 | + \n</body>\n</div></body></html>""" |
41 | 41 |
|
42 | 42 | Change Log |
43 | 43 | ---------- |
|