Skip to main content

Bing Search Scraper - A Python library for retrieving search results from Bing

Project description

Bing Search Scraper

Overview

Easily scrape Bing search results using Python. This library leverages requests for making HTTP requests and BeautifulSoup for parsing HTML content. It offers both synchronous and asynchronous functionality for efficient retrieval of results.

Installation

Install via pip:

pip install bing-results-scraper

Usage

Synchronous Usage:

from bing_results_scraper import BingScraper

# Create a scraper instance
bing = BingScraper() #headers=Optional(default header will be used), max_retries=Optional(default: 3), num_results=Optional(default: 10)

# Fetch results for a single query
results = bing.get_results(q='Query')

# Access the results
print(results['organic_results'])

Asynchronous Usage:

from bing_results_scraper import AsyncBingScraper

# Create an asynchronous scraper instance
async_bing = AsyncBingScraper()#headers=Optional, max_retries=Optional(default: 3), num_results=Optional(default: 10)

# Fetch results for multiple queries
queries = ['Query 1', 'Query 2', 'Query 3']
results = async_bing.get_results(queries)

# Access the results for each query
for result in results:
    print(result['organic_results'])

Features

  • Synchronous and asynchronous scraping options
  • Customizable headers
  • Automatic query URL encoding
  • Response status handling
  • Retries for failed requests
  • Parsed organic result data extraction
  • Clear output structure

Contributing

Contributions are welcome! Please follow the standard fork-and-pull request workflow on GitHub.

Author

Renukumar R

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

bing-results-scraper-0.4.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bing_results_scraper-0.4.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file bing-results-scraper-0.4.0.tar.gz.

File metadata

  • Download URL: bing-results-scraper-0.4.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for bing-results-scraper-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a6fded0de5bfe648f7bd7dd832e321f4d0d55ee763b841f60612581e2314ed5e
MD5 8b532297d02b34746b44094b78bde213
BLAKE2b-256 75aa74ff32c672d07a9cb973e8958d9c6b7689f5ee47490bdcf5ed2b6c8784d8

See more details on using hashes here.

File details

Details for the file bing_results_scraper-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bing_results_scraper-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b70aa18b5b12d045ab0207cc225d61aaa6d9fd2c619472ce3934d63ac812fb17
MD5 ffa75b45fa833c1f05f75f9a67ad1651
BLAKE2b-256 47db942f7ba68f8d2dc97ea0018fef543e0926b3cde727d89436ae404e60688f

See more details on using hashes here.

Supported by

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