Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yasulab/simple-tag-getter-with-lxml

Get html elements with just one line command.
https://github.com/yasulab/simple-tag-getter-with-lxml

Last synced: 1 day ago
JSON representation

Get html elements with just one line command.

Awesome Lists containing this project

README

        

Description:

Given URL and tag (and its attributes),
scrape the sentences with the tags in the URL.

Usage Example:

$ python tag-getter.py http://ebooks.adelaide.edu.au/c/carroll/lewis/alice/chapter1.html div class=dochead

Created Xpath: //div[@class="dochead"]
Alice in Wonderland, by Lewis Carroll

$ python tag-getter.py http://ebooks.adelaide.edu.au/c/carroll/lewis/alice/chapter1.html p

Created Xpath: //p
Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice
she had peeped into the book her sister was reading, but it had no pictures or conversations in it, ‘and what is the use of
a book,’ thought Alice ‘without pictures or conversation?’