mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +00:00
Update domain
This commit is contained in:
parent
6a6a24165c
commit
d2b56a2437
6
.github/workflows/update-loc-badge.yml
vendored
6
.github/workflows/update-loc-badge.yml
vendored
@ -2,7 +2,7 @@ name: Update Lines of Code Badge
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
- cron: '0 0 * * 0'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@ -18,12 +18,12 @@ jobs:
|
||||
- name: Count Lines of Code
|
||||
run: |
|
||||
LOC=$(cloc . --json | jq '.SUM.code')
|
||||
echo "{\"schemaVersion\": 1, \"label\": \"Lines of Code\", \"message\": \"$LOC\", \"color\": \"green\"}" > loc-badge.json
|
||||
echo "{\"schemaVersion\": 1, \"label\": \"Lines of Code\", \"message\": \"$LOC\", \"color\": \"green\"}" > Test/Util/loc-badge.json
|
||||
|
||||
- name: Commit and Push LOC Badge
|
||||
run: |
|
||||
git config --local user.name "GitHub Actions"
|
||||
git config --local user.email "actions@github.com"
|
||||
git add loc-badge.json
|
||||
git add Test/Util/loc-badge.json
|
||||
git commit -m "Update lines of code badge" || echo "No changes to commit"
|
||||
git push
|
@ -25,7 +25,7 @@
|
||||
<img src="https://img.shields.io/pypi/dm/streamingcommunity?style=for-the-badge" alt="PyPI Downloads"/>
|
||||
</a>
|
||||
<a href="https://github.com/Lovi-0/StreamingCommunity">
|
||||
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Lovi-0/StreamingCommunity/main/loc-badge.json&style=for-the-badge" alt="Lines of Code"/>
|
||||
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Lovi-0/StreamingCommunity/main/Test/Util/loc-badge.json&style=for-the-badge" alt="Lines of Code"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@ -471,12 +471,12 @@ The `run-container` command mounts also the `config.json` file, so any change to
|
||||
| Website | Status |
|
||||
|:-------------------|:------:|
|
||||
| [1337xx](https://1337xx.to/) | ✅ |
|
||||
| [AltadefinizioneGratis](https://altadefinizionegratis.info/) | ✅ |
|
||||
| [AltadefinizioneGratis](https://altadefinizionegratis.site/) | ✅ |
|
||||
| [AnimeUnity](https://animeunity.so/) | ✅ |
|
||||
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ |
|
||||
| [CB01New](https://cb01new.video/) | ✅ |
|
||||
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ |
|
||||
| [GuardaSerie](https://guardaserie.academy/) | ✅ |
|
||||
| [GuardaSerie](https://guardaserie.meme/) | ✅ |
|
||||
| [MostraGuarda](https://mostraguarda.stream/) | ✅ |
|
||||
| [StreamingCommunity](https://streamingcommunity.paris/) | ✅ |
|
||||
|
||||
|
@ -7,7 +7,7 @@ from urllib.parse import urlparse, unquote
|
||||
|
||||
# External libraries
|
||||
import httpx
|
||||
from serpapi import search
|
||||
from googlesearch import search
|
||||
|
||||
|
||||
# Internal utilities
|
||||
@ -15,7 +15,6 @@ from StreamingCommunity.Util.headers import get_headers
|
||||
from StreamingCommunity.Util.console import console, msg
|
||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||
|
||||
api_key = "ebfaafb043613442e0010e3795c9ead4cab196e5448a6e3728d64edbbccdf731"
|
||||
base_headers = {
|
||||
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
||||
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
@ -76,7 +75,7 @@ def get_base_url(url_str):
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def validate_url(url, base_url, max_timeout, max_retries=3, sleep=3):
|
||||
def validate_url(url, base_url, max_timeout, max_retries=2, sleep=1):
|
||||
"""Validate if URL is accessible and matches expected base domain."""
|
||||
console.print(f"\n[cyan]Starting validation for URL[white]: [yellow]{url}")
|
||||
|
||||
@ -164,16 +163,9 @@ def search_domain(site_name: str, base_url: str, get_first: bool = False):
|
||||
console.print(f"\n[cyan]Searching for alternate domains for[white]: [yellow]{base_domain}")
|
||||
|
||||
try:
|
||||
params = {
|
||||
"q": base_domain,
|
||||
"hl": "it",
|
||||
"gl": "it",
|
||||
"num": 20,
|
||||
"api_key": api_key
|
||||
}
|
||||
search_results = [element['link'] for element in search(params)['organic_results']]
|
||||
base_urls = set()
|
||||
search_results = list(search(base_domain, num_results=20, lang="it"))
|
||||
|
||||
base_urls = set()
|
||||
for url in search_results:
|
||||
element_url = get_base_url(url)
|
||||
if element_url:
|
||||
|
@ -62,10 +62,10 @@
|
||||
"domain": "paris"
|
||||
},
|
||||
"altadefinizionegratis": {
|
||||
"domain": "info"
|
||||
"domain": "site"
|
||||
},
|
||||
"guardaserie": {
|
||||
"domain": "academy"
|
||||
"domain": "meme"
|
||||
},
|
||||
"mostraguarda": {
|
||||
"domain": "stream"
|
||||
|
@ -8,7 +8,7 @@ unidecode
|
||||
jsbeautifier
|
||||
pathvalidate
|
||||
pycryptodomex
|
||||
googlesearch-python
|
||||
fake-useragent
|
||||
qbittorrent-api
|
||||
python-qbittorrent
|
||||
serpapi
|
||||
python-qbittorrent
|
Loading…
x
Reference in New Issue
Block a user