Skip to main content

A fast web scraping library

Project description

Try Web Scraping Logo

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:

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


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.35.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

trywebscraping-0.1.35-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file trywebscraping-0.1.35.tar.gz.

File metadata

  • Download URL: trywebscraping-0.1.35.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for trywebscraping-0.1.35.tar.gz
Algorithm Hash digest
SHA256 d2a1b9f7c2c5a2a994e56fb5b5dc0aba40f2d4e3237ec4a6a4523310a8059535
MD5 46e251cdb75391589026ecc397879c58
BLAKE2b-256 f2729faa8cbd8e10d9cb460d8ab0527aa979e11535e0e11a9801098044ebd185

See more details on using hashes here.

File details

Details for the file trywebscraping-0.1.35-py3-none-any.whl.

File metadata

File hashes

Hashes for trywebscraping-0.1.35-py3-none-any.whl
Algorithm Hash digest
SHA256 5aec6f807674c904e2e9092f611c5c025534d6b3b9a0dceeb2c77a1368a10c16
MD5 c2bc3a34e7d7dcc03d06f11c2aa92871
BLAKE2b-256 b8f5bd51f56c53bdf727c598ce9bc7fb6baf113f266040293c3e2af89333e43f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page