Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trywebscraping

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trywebscraping

A fast web scraping library

  • 0.1.37
  • PyPI
  • Socket score

Maintainers
1
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:

  • 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!

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc