Web scraping with pure python
Project description
About
gazpacho is a pure python web scraping library.
It replaces requests and BeautifulSoup for most projects, but not all projects.
gazpacho is small, simple, and predictable.
Usage
To use gazpacho you need two things: get
and .find
.
Here's a quick example:
from gazpacho import get, Soup
url = 'https://en.wikipedia.org/wiki/Gazpacho'
html = get(url)
soup = Soup(html)
soup.find('span', {'class': 'mw-headline'})
# [<span class="mw-headline" id="History">History</span>,
# <span class="mw-headline" id="Ingredients_and_preparation">Ingredients and preparation</span>,
# <span class="mw-headline" id="Variations">Variations</span>,
# <span class="mw-headline" id="In_Spain">In Spain</span>,
# <span class="mw-headline" id="Arranque_roteño">Arranque roteño</span>,
# <span class="mw-headline" id="Extremaduran_variations">Extremaduran variations</span>,
# <span class="mw-headline" id="La_Mancha_variations">La Mancha variations</span>,
# <span class="mw-headline" id="Castilian_variations">Castilian variations</span>,
# <span class="mw-headline" id="See_also">See also</span>,
# <span class="mw-headline" id="References">References</span>]
Installation
pip install gazpacho
Contribute
For feature requests or bug reports, please use Github Issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gazpacho-0.6.0.tar.gz
(3.1 kB
view hashes)