Metadata-Version: 2.4
Name: google-search-playwright
Version: 4.0.1
Summary: Unofficial Python bindings to the Google search engine using Playwright. Not affiliated with Google.
Author-email: SkillfulElectro <electromutex@gmail.com>
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/SkillfulElectro/google-search-playwright
Project-URL: Source, https://github.com/SkillfulElectro/google-search-playwright
Project-URL: Documentation, https://python-googlesearch.readthedocs.io/en/latest/
Project-URL: Issues, https://github.com/SkillfulElectro/google-search-playwright/issues
Keywords: google,search,playwright,web,scraping
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: playwright>=1.40
Dynamic: license-file

# Google Search (Playwright)

Google search from Python, powered by Playwright.

**Note**: this project is not affiliated with Google in any way.

## Why this fork?

Google's web search interface now requires JavaScript for most requests, which
broke the classic `urllib` + `BeautifulSoup` scraping used by the original
`googlesearch` library (`pip install google`). This package replaces that stack
with a real headless browser driven by Playwright, so it keeps working against
the current Google search experience.

## Usage example

```python
from googlesearch import search

# Get the first 20 hits for: "Breaking Code" WordPress blog
for url in search('"Breaking Code" WordPress blog', stop=20):
    print(url)
```

More examples:

```python
from googlesearch import search, lucky

# "I'm feeling lucky"
first = lucky('python programming')
print(first)  # https://www.python.org/

# Limit to recent results
for url in search('latest news', stop=10):
    print(url)
```

## Requirements

- Python 3.8+
- A Chromium, Chrome, Chrome-based (e.g. Microsoft Edge), or Firefox browser
  installed on your system. No Playwright browser downloads are needed.

The browser is found automatically. See `find_browser()` for the search order.

## Installing

    pip install google-search-playwright

## Command-line usage

A `google` console script is provided:

```bash
google "python programming" --stop 5
google "linux kernel" --browser chromium
```

Run `google --help` for all options.

## Browser auto-detection

The library searches in this order:

1. **Chromium/Chrome family** via PATH: `chromium`, `chromium-browser`,
   `google-chrome`, `google-chrome-stable`, `chrome`, `chrom`, `microsoft-edge`,
   `edge`.
2. Chromium/Chrome family at platform-specific paths (macOS `.app` bundles,
   Windows `Program Files`).
3. **Firefox** via PATH: `firefox`, `firefox-esr`, `firefox-nightly`.
4. Firefox at platform-specific paths.

You can override this with `search(..., browser_type="firefox", exe_path="/path")`.

## API reference

This documentation is generated from the source via Sphinx:

https://python-googlesearch.readthedocs.io/en/latest/

## License

BSD 3-Clause. See `LICENSE`.
