Skip to main content

A package for scraping search results from Yahoo Search.

Project description

SocialCrawler

SocialCrawler is a Python package designed to scrape search results from Yahoo Search for specific domains. It utilizes requests and BeautifulSoup to extract search results from Yahoo Search pages.

Installation

You can install SocialCrawler via pip:

pip install socialCrawler

Usage

from socialCrawler import search

# Define your search query
query = "python tutorials"

# Define the list of domains to search within
domains = ["stackoverflow", "instagram"]

# Define the number of search results to retrieve per domain
num_results = 5

# Perform the search
results = search(query, domains, num_results)

# Print the search results
for result in results:
    print(result)

Functions

search(query, domains, num_results=1, proxies=None)

Search for the specified query in the specified domains and retrieve search results.

  • query (str): The search query.
  • domains (list): List of domains to search within.
  • num_results (int): Number of search results to retrieve per domain. Default is 1.
  • proxies (list): List of dictionaries containing proxy information. Default is None.

Returns:

  • list: A list of dictionaries containing search results.

scrape(url, proxy, domain)

Scrape search results from the specified URL for a given domain.

  • url (str): The URL to scrape.
  • proxy (dict): Dictionary containing proxy information.
  • domain (str): The domain for which to scrape search results.

Returns:

  • list: A list of dictionaries containing scraped search results.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

yahooproject-1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

YahooProject-1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file yahooproject-1.0.tar.gz.

File metadata

  • Download URL: yahooproject-1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for yahooproject-1.0.tar.gz
Algorithm Hash digest
SHA256 426709ccefaf5093cdb3a957e7780d7f2de318f9537dfe6e9daa577263120283
MD5 7c75634ede9ce55aaed0df9d14d42244
BLAKE2b-256 a0011382e49b7d4afea5d0e4e6308609017af210ab23e67ef3cf221283faae60

See more details on using hashes here.

File details

Details for the file YahooProject-1.0-py3-none-any.whl.

File metadata

  • Download URL: YahooProject-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for YahooProject-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c0e0fb98f44168873de9517f48115fdef04861620a3c6cd2818feb4113199e4
MD5 541022466138d96f9a16584bfb637e66
BLAKE2b-256 61aa6c77c797f6411a06a5ee4252b395bb129797a86cf880a545645b3b807fc3

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