Guest User

Untitled

a guest
Nov 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. # File : fromstring函数.py
  4. # Date : 20.11.2018
  5. # Last Modified Date: 20.11.2018
  6. """
  7. 分析html,return a single element/document
  8. """
  9. from lxml import html
  10. tree = html.fromstring("<p>Hello, World!</p>")
  11. print(html.tostring(tree))
Add Comment
Please, Sign In to add comment