scraper
playwright-python
Our great sponsors
scraper | playwright-python | |
---|---|---|
12 | 31 | |
98 | 10,675 | |
- | 4.1% | |
0.0 | 9.0 | |
about 1 year ago | 3 days ago | |
TypeScript | Python | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
scraper
- Most Used Individual JavaScript Libraries - jQuery still leads
-
Most Used JavaScript Libraries (percentage) - June 2022 [OC]
Additional info and source code for generating the dataset, summarizing it and rendering the chart are available at https://github.com/get-set-fetch/scraper/tree/main/datasets/javascript-libs-from-top-1mm-sites
-
How to collaborate on web scraping?
Store the scrape progress (to-be-scraped / in-progress / scraped / in-error URLs) in a database shared by all participants and scrape in parallel with as many machines as the db load permits. Got a connection timeout / IP is blocked on one machine ? Update the scrape status for the corresponding URL and let another machine retry it. https://github.com/get-set-fetch/scraper (written in typescript) follows this idea. Using Terraform from a simple config file you can adjust the number of scraper instances to be deployed in cloud at startup and during the scraping process. In benchmarks a PostgreSQL server running on a DigitalOcean vm with 4vCPU, 8GB memory allows for ~2000 URLs to be scraped per second (synthetic data, no external traffic). From my own experience this is almost never the bottleneck. Obeying robots.txt crawl-delay will surely put you under this limit. Disclaimer: I'm the npm package author.
-
How to serve scrapped data?
Written in typescript https://github.com/get-set-fetch/scraper stores scraped content directly in a database (sqlite, mysql, postgresql). Each URL represents a Resource. You can implement your own IResourceStorage and define the exact db columns you need.
-
How to scrape entire blogs with content?
You can use https://github.com/get-set-fetch/scraper with a custom plugin based on the mozilla/readability as detailed in https://getsetfetch.org/node/custom-plugins.html (extracting news article content). I think it's a close match to your use case.
-
A simple solution to rotate proxies or how to spin up your own rotation proxy server with Puppeteer and only a few lines of JS code
I'm currently implementing concurrency conditions at project/proxy/domain/session level in https://github.com/get-set-fetch/scraper . On each level you can define the maximum number of requests and the delay between two consecutive requests.
-
Web scraping content into postgresql? Scheduling web scrapers into a pipeline with airflow?
If you're familiar with nodejs give https://github.com/get-set-fetch/scraper a try. Scraped content can be stored in sqlite, mysql or postgresql. It also supports puppeteer, playwright, cheerio or jsdom for the actual content extraction. No scheduler though.
-
Web Scraping 101 with Python
I'm using this exact strategy to scrape content directly from DOM using APIs like document.querySelectorAll. You can use the same code in both headless browser clients like Puppeteer or Playwright and DOM clients like cheerio or jsdom (assuming you have a wrapper over document API). Depending on the way a web page was fetched (opened in a browser tab or fetched via nodejs http/https requests), ExtractHtmlContentPlugin, ExtractUrlsPlugin use different DOM wrappers (native, cheerio, jsdom) to scrape the content.
[1] https://github.com/get-set-fetch/scraper/blob/main/src/plugi...
-
What is your “I don't care if this succeeds” project?
https://github.com/get-set-fetch/scraper - I've been working (intermittently :) ) on a nodejs or browser extension scraper for the last 3 years, see the other projects under the get-set-fetch umbrella. Putting a lot more effort lately as I really want to do those Alexa top 1 million analysis like top js libraries, certificate authorities and so on. A few weeks back I've posted on Show:HN as you can do basic/intermediate? scraping with it.
Not capable of handling 1 mil+ pages as it still limited to puppeteer or playwright. Working on adding cheerio/jsdom support right now.
playwright-python
-
Scrape Google Flights with Python
Playwright
-
Login for web-scraping help
An alternative is to use a package like playwright (or Selenium) to run a browser remotely and login.
-
Show HN: Use cookies from Chrome (CDP) in cURL without copy pasting
Using the tools at hand is often the best approach. That said, I've spent most of the last 13 years of my career automating browsers. For years, I used Selenium with a variety of libraries. After switching to Puppeteer/Playwright, I have zero interest in going back lol. Playwright actually has first party Python support. (Puppeteer has a port called Pyppeteer, but it's no longer maintained and the author recommends using Playwright)
https://playwright.dev/python/
- Any extension to automate workflow in automatic1111?
- Can Requests be used to make a call to a js script? Need some guidance.
-
I can't find any good Python Selenium tutorials out there. Anyone got any good links to video tutorials or even dcoumentatniton?
This is pretty great for web automation https://playwright.dev/python/
-
will requests-html library work as selenium
Last I checked, pyppeteer wasn't a thing anymore, and I haven't tried Playwright but if it has a headless mode, thats what you want so you don't have a browser open.
-
Scrape Google Lens with Python
Playwright
-
Toggle Line Comments in other languages?
there are cases where a file contains at least 2 programming languages . A case like this is when using the playwright-python library i.e. the code is mainly in python, but it can contain also JS code within a page.evaluate() function. When I try to comment out some lines within the page.evaluate() function, VS Code uses the "#" symbol, instead of "//". I can use multiple cursors to insert the "//"., but it's not so convenient, So I was wondering if there is a way to tell VS Code that this part of code is JS and it should use "//" for commenting out or if there is a plugin that can do this job (I didnt find one...)
-
Is there a better alternative to selenium, that run headless by default?
Playwright is pretty cool: https://github.com/microsoft/playwright-python
What are some alternatives?
puppeteer-cluster - Puppeteer Pool, run a cluster of instances in parallel
Playwright - Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
playwright-recaptcha-solver - ReCaptcha V2 solver for Playwright
Scrapy - Scrapy, a fast high-level web crawling & scraping framework for Python.
pyppeteer - Headless chrome/chromium automation library (unofficial port of puppeteer)
playwright-java - Java version of the Playwright testing and automation library
Twitch-Drops-Bot - A Node.js bot that will automatically watch Twitch streams and claim drop rewards.
vopono - Run applications through VPN tunnels with temporary network namespaces
pyppeteer_stealth
listudy - Listudy - chess training server
playwright-dotnet - .NET version of the Playwright testing and automation library.