Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scrapy import Selector
- html ='''
- <html>
- <body>
- <div>
- <p>Hello World</p>
- <p>Enjoy MLAIT</p>
- </div>
- <p>Thanks for viewing the article</p>
- </body>
- </html>
- '''
- sel = Selector(text=html)
- sel.xpath("//p")
- ##Output the selector List
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement