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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yahooproject-0.3.tar.gz.
File metadata
- Download URL: yahooproject-0.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d9b3888a01c4c20a6adb76c9d99b465c1245ddf447a6bed60d0aac784db5072
|
|
| MD5 |
8115bcf00ff5e5ff99400ba6099cc8c8
|
|
| BLAKE2b-256 |
07456a4ad0449f3ba3d7df3866971e9531dd3be70bc8c935f3710f88e2d0cbe0
|
File details
Details for the file YahooProject-0.3-py3-none-any.whl.
File metadata
- Download URL: YahooProject-0.3-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3f4176e1a0b2cb9b4614227447fb08393046f41e94094e5c1bfe8f1b591a36d
|
|
| MD5 |
a6c120dd76f96a000b915822b035a648
|
|
| BLAKE2b-256 |
4a1fffccb84f6c2bdadd8a257c436c8a1822273519014cceba63d07ef489a3e8
|