uma biblioteca pra facilitar pesquisas
Project description
Library Description: Internet Searches and Text Translation
The library offers several functionalities to facilitate internet searches and text translations. With these tools, users can perform searches on various search engines, access information from Wikipedia, search for news, check website availability, perform currency conversions, and translate texts.
Key Features:
-
YouTube Search (
search_youtube
): Performs a direct search on YouTube based on a provided keyword and opens the default browser to display the search results. -
Google Search (
search_google
), Bing Search (search_bing
), and DuckDuckGo Search (search_duckgo
): Performs direct searches on Google, Bing, and DuckDuckGo search engines, respectively, and opens the default browser to display the search results. -
Wikipedia Search (
search_wikipedia
): Retrieves summarized information from Wikipedia in a specified language based on a provided keyword. Users can set the language of the search to obtain information in different languages. -
Google Books Search (
search_google_books
): Performs a search on Google Books based on a provided keyword and returns a list of relevant book titles. -
Paginated Wikipedia Search (
search_wikipedia_paginated
): Performs a search on Wikipedia and returns the results in pages, allowing users to access information in parts, with a specific number of results per page. -
Website Availability Check (
check_website_availability
): Verifies if a specific website is available and returns a boolean value indicating its accessibility. -
News Search (
search_news
): Performs a news search based on a provided keyword and returns a list of URLs with the news results. -
Currency Conversion (
convert_currency
): Converts a value from one currency to another based on exchange rates obtained from an external API. -
Text Translation (
translate_text
): Translates a text from a source language to a target language using the Yandex Translate API.
These functionalities provide a convenient and easy way for users to access internet information and perform translation tasks, making the library a useful tool for internet searches and text translations in various contexts and scenarios.
Example:
import anybonett.NET as ab
# Perform a YouTube search
ab.search_youtube("funny cats videos")
# Perform a Google search
ab.search_google("Python programming")
# Search Wikipedia for information in French
result = ab.search_wikipedia("Artificial Intelligence", "fr", 2)
print(result)
# Check website availability
url = "https://www.example.com"
availability = ab.check_website_availability(url)
print(f"Website {url} is available: {availability}")
# Perform a news search
news_list = ab.search_news("Technology trends")
print(news_list)
# Convert currency from USD to EUR
amount = 100
from_currency = "USD"
to_currency = "EUR"
api_key = "your_api_key"
result = ab.convert_currency(amount, from_currency, to_currency, api_key)
print(result)
# Translate a text from English to Spanish
text = "Hello, how are you?"
source_language = "en"
target_language = "es"
translation = ab.translate_text(text, source_language, target_language)
print(translation)
Please note that some functionalities may require API keys, as indicated in the documentation for each function. Also, ensure that you have installed the necessary dependencies, such as wikipedia
, googlesearch-python
, requests
, and translate
.
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
File details
Details for the file anyBoNett-0.1.1.tar.gz
.
File metadata
- Download URL: anyBoNett-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07aac7aca258dba77dfb728e28f07f9726e349144003687712bc3cd5a0f467e |
|
MD5 | d80f27267860718c99f6ae4f9f55dc24 |
|
BLAKE2b-256 | 3534cd4b3f67ae4c33b3f7716121d29a8eb1fc27ad11a1507e36acb5e683616e |