
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
pip install search_engines
Each search engine has a module {engine_name}.py which two functions:
extract_search_results(html: str, page_url: str) -> Tuple[List[Dict[str, str]], str]
and
get_search_url(query: str, latest: bool = True, country: str = 'us') -> str
Construct a URL for the first results page of searching "Tesla TSLA" in Bing Search.
from search_engines import bing_search
url = bing_search.get_search_url('Tesla TSLA')
Load the URL using a simple HTTP client or web browser and extract the page HTML.
This package does not make any restrictions on clients can be used. We'll use the requests
library for this example.
import requests
resp = requests.get(url)
html = resp.text
We can now extract search results from the HTML.
The returned results
list will be a list of dictionaries with keys url
, title
, preview_text
, page_number
.
If we want to scrape multiple pages, we can load the next page using the returned next_page_url
, and again extracting the results using extract_search_results
.
results, next_page_url = bing_search.extract_search_results(html, url)
Add new search engines! =)
FAQs
Query and scrape search engines.
We found that search-engines demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.