mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-03 10:00:10 +00:00
Dev (#318)
* Fix telegram bot (issues #305 bug) (#316) * fix create config.json * fix messagge telegram_bot option 0 (Streamingcommunity) * Update README.md * Update domain --------- Co-authored-by: GiuPic <47813665+GiuPic@users.noreply.github.com>
This commit is contained in:
parent
e75d8185f9
commit
8e323e83f9
@ -35,7 +35,7 @@
|
||||
<summary>📦 Installation</summary>
|
||||
|
||||
- 🔄 [Update Domains](#update-domains)
|
||||
- 🌐 [Available Sites](https://arrowar.github.io/StreamingDirectory/)
|
||||
- 🌐 [Available Sites](https://arrowar.github.io/StreamingCommunity/)
|
||||
- 🛠️ [Installation](#installation)
|
||||
- 📦 [PyPI Installation](#1-pypi-installation)
|
||||
- 🔄 [Automatic Installation](#2-automatic-installation)
|
||||
@ -799,4 +799,4 @@ Tool per guardare o scaricare film dalla piattaforma StreamingCommunity.
|
||||
|
||||
# Disclaimer
|
||||
|
||||
This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
|
||||
This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
|
||||
|
@ -97,7 +97,21 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
|
||||
return
|
||||
|
||||
if string_to_search is None:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert a word to search in [green]{site_constant.SITE_NAME}").strip()
|
||||
if site_constant.TELEGRAM_BOT:
|
||||
bot = get_bot_instance()
|
||||
string_to_search = bot.ask(
|
||||
"key_search",
|
||||
f"Enter the search term\nor type 'back' to return to the menu: ",
|
||||
None
|
||||
)
|
||||
|
||||
if string_to_search == 'back':
|
||||
|
||||
# Restart the script
|
||||
subprocess.Popen([sys.executable] + sys.argv)
|
||||
sys.exit()
|
||||
else:
|
||||
string_to_search = msg.ask(f"\n[purple]Insert a word to search in [green]{site_constant.SITE_NAME}").strip()
|
||||
|
||||
# Search on database
|
||||
len_database = title_search(string_to_search)
|
||||
|
@ -55,7 +55,7 @@ def download_film(select_title: MediaItem) -> str:
|
||||
console.print(f"[bold yellow]Download:[/bold yellow] [red]{site_constant.SITE_NAME}[/red] → [cyan]{select_title.name}[/cyan] \n")
|
||||
|
||||
# Init class
|
||||
video_source = VideoSource(site_constant.FULL_URL, False, select_title.id)
|
||||
video_source = VideoSource(f"{site_constant.FULL_URL}/it", False, select_title.id)
|
||||
|
||||
# Retrieve scws and if available master playlist
|
||||
video_source.get_iframe(select_title.id)
|
||||
|
@ -154,8 +154,8 @@ def download_series(select_season: MediaItem, season_selection: str = None, epis
|
||||
start_message()
|
||||
|
||||
# Init class
|
||||
video_source = VideoSource(site_constant.FULL_URL, True, select_season.id)
|
||||
scrape_serie = GetSerieInfo(site_constant.FULL_URL, select_season.id, select_season.slug)
|
||||
video_source = VideoSource(f"{site_constant.FULL_URL}/it", True, select_season.id)
|
||||
scrape_serie = GetSerieInfo(f"{site_constant.FULL_URL}/it", select_season.id, select_season.slug)
|
||||
|
||||
# Collect information about season
|
||||
scrape_serie.getNumberSeason()
|
||||
|
@ -46,7 +46,7 @@ def title_search(query: str) -> int:
|
||||
|
||||
try:
|
||||
response = httpx.get(
|
||||
site_constant.FULL_URL,
|
||||
f"{site_constant.FULL_URL}/it",
|
||||
headers={'user-agent': get_userAgent()},
|
||||
timeout=max_timeout
|
||||
)
|
||||
@ -59,7 +59,7 @@ def title_search(query: str) -> int:
|
||||
console.print(f"[red]Site: {site_constant.SITE_NAME} version, request error: {e}")
|
||||
return 0
|
||||
|
||||
search_url = f"{site_constant.FULL_URL}/search?q={query}"
|
||||
search_url = f"{site_constant.FULL_URL}/it/search?q={query}"
|
||||
console.print(f"[cyan]Search url: [yellow]{search_url}")
|
||||
|
||||
try:
|
||||
|
@ -36,8 +36,13 @@ class ConfigManager:
|
||||
base_path = os.path.dirname(sys.executable)
|
||||
|
||||
else:
|
||||
# Use the current directory where the script is executed
|
||||
base_path = os.getcwd()
|
||||
|
||||
# Get the actual path of the module file
|
||||
current_file_path = os.path.abspath(__file__)
|
||||
# Navigate upwards to find the project root
|
||||
# Assuming this file is in a package structure like StreamingCommunity/Util/config_json.py
|
||||
# We need to go up 2 levels to reach the project root
|
||||
base_path = os.path.dirname(os.path.dirname(os.path.dirname(current_file_path)))
|
||||
|
||||
# Initialize file paths
|
||||
self.file_path = os.path.join(base_path, file_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user