A fast web scraping library
Project description
Try Web Scraping
To get started, run: pip install trywebscraping
Here's some example code to help you begin:
from trywebscraping import Fetch
hn = Fetch("https://news.ycombinator.com")
articles = hn.query("tr.athing").extract({
"rank": "span.rank",
"title": "td.title a",
"link": "td.title a@href"
}).limit(10)
print(articles)
Or for a more complex example:
from trywebscraping import Fetch
amazon = Fetch("https://www.amazon.com/s?k=cracking+the+coding+interview")
product_listings = amazon.query("div.s-card-container").extract({
"title": "h2 a span.a-text-normal",
"price": "span.a-price-whole",
"rating": "span.a-icon-alt",
"num_reviews": "a-size-base",
"product_link": "h2 a.a-link-normal@href",
"product_image": "img.s-image@src"
})
print(product_listings)
If you're interested in this project, please connect with me:
- Schedule a call: https://cal.com/lukelucas/30min
- Email: luke.lucas@trywebscraping.com
For issues, feedback, or general discussion about the library, you can use our GitHub repository: https://github.com/webscrape/trywebscraping-python
I appreciate any communications, regardless of how you choose to reach out!
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
trywebscraping-0.1.37.tar.gz
(10.6 kB
view details)
Built Distribution
File details
Details for the file trywebscraping-0.1.37.tar.gz
.
File metadata
- Download URL: trywebscraping-0.1.37.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dab884f983af428a60061d2a714d502a852edd8b79934ae4f936bcfacad8f84 |
|
MD5 | 40fcf201b1a14f592b7c01d4f0358bcf |
|
BLAKE2b-256 | 9ec0ad9c1a41bfab5602132065debcbeba174d340e9a58351a83c70f42f12900 |
File details
Details for the file trywebscraping-0.1.37-py3-none-any.whl
.
File metadata
- Download URL: trywebscraping-0.1.37-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003de147aeb03dd2e5f58d2a97fc8c1c754c54d3f33ad562847cbb4b5c4a20b3 |
|
MD5 | fe271d916d1968a88157d287d2cd8d49 |
|
BLAKE2b-256 | a7518cb3983c7d94925ad75fcb31dee7024d6c8603bf766c6e96d8eb97519903 |