Usage Example:
import urllib2
from jparser import PageModel
html = urllib2.urlopen("http://news.sohu.com/20170512/n492734045.shtml").read().decode('gb18030')
pm = PageModel(html)
result = pm.extract()
print "==title=="
print result['title']
print "==content=="
for x in result['content']:
if x['type'] == 'text':
print x['data']
if x['type'] == 'image':
print "[IMAGE]", x['data']['src']
Release files for jparser 0.0.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jparser-0.0.20.tar.gz | 3.5 kB | Details |
Release files / jparser-0.0.20.tar.gz
| Download URL | jparser-0.0.20.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6b3c6ff5cc20c615f4b097c4f1b765495a315790110a5032f694b72ac6b392b
|
|
BLAKE2b-256 checksum How to use checksums |
78fea080447f4058c0961d8db205f278d8fc4f623bdb581a5c56e750012af3a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |