mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 03:55:24 +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:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * 0'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -18,12 +18,12 @@ jobs:
|
|||||||
- name: Count Lines of Code
|
- name: Count Lines of Code
|
||||||
run: |
|
run: |
|
||||||
LOC=$(cloc . --json | jq '.SUM.code')
|
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
|
- name: Commit and Push LOC Badge
|
||||||
run: |
|
run: |
|
||||||
git config --local user.name "GitHub Actions"
|
git config --local user.name "GitHub Actions"
|
||||||
git config --local user.email "actions@github.com"
|
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 commit -m "Update lines of code badge" || echo "No changes to commit"
|
||||||
git push
|
git push
|
@ -25,7 +25,7 @@
|
|||||||
<img src="https://img.shields.io/pypi/dm/streamingcommunity?style=for-the-badge" alt="PyPI Downloads"/>
|
<img src="https://img.shields.io/pypi/dm/streamingcommunity?style=for-the-badge" alt="PyPI Downloads"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Lovi-0/StreamingCommunity">
|
<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>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -471,12 +471,12 @@ The `run-container` command mounts also the `config.json` file, so any change to
|
|||||||
| Website | Status |
|
| Website | Status |
|
||||||
|:-------------------|:------:|
|
|:-------------------|:------:|
|
||||||
| [1337xx](https://1337xx.to/) | ✅ |
|
| [1337xx](https://1337xx.to/) | ✅ |
|
||||||
| [AltadefinizioneGratis](https://altadefinizionegratis.info/) | ✅ |
|
| [AltadefinizioneGratis](https://altadefinizionegratis.site/) | ✅ |
|
||||||
| [AnimeUnity](https://animeunity.so/) | ✅ |
|
| [AnimeUnity](https://animeunity.so/) | ✅ |
|
||||||
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ |
|
| [Ilcorsaronero](https://ilcorsaronero.link/) | ✅ |
|
||||||
| [CB01New](https://cb01new.video/) | ✅ |
|
| [CB01New](https://cb01new.video/) | ✅ |
|
||||||
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ |
|
| [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ |
|
||||||
| [GuardaSerie](https://guardaserie.academy/) | ✅ |
|
| [GuardaSerie](https://guardaserie.meme/) | ✅ |
|
||||||
| [MostraGuarda](https://mostraguarda.stream/) | ✅ |
|
| [MostraGuarda](https://mostraguarda.stream/) | ✅ |
|
||||||
| [StreamingCommunity](https://streamingcommunity.paris/) | ✅ |
|
| [StreamingCommunity](https://streamingcommunity.paris/) | ✅ |
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ from urllib.parse import urlparse, unquote
|
|||||||
|
|
||||||
# External libraries
|
# External libraries
|
||||||
import httpx
|
import httpx
|
||||||
from serpapi import search
|
from googlesearch import search
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
@ -15,7 +15,6 @@ from StreamingCommunity.Util.headers import get_headers
|
|||||||
from StreamingCommunity.Util.console import console, msg
|
from StreamingCommunity.Util.console import console, msg
|
||||||
from StreamingCommunity.Util._jsonConfig import config_manager
|
from StreamingCommunity.Util._jsonConfig import config_manager
|
||||||
|
|
||||||
api_key = "ebfaafb043613442e0010e3795c9ead4cab196e5448a6e3728d64edbbccdf731"
|
|
||||||
base_headers = {
|
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': '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',
|
'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:
|
except Exception:
|
||||||
return None
|
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."""
|
"""Validate if URL is accessible and matches expected base domain."""
|
||||||
console.print(f"\n[cyan]Starting validation for URL[white]: [yellow]{url}")
|
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}")
|
console.print(f"\n[cyan]Searching for alternate domains for[white]: [yellow]{base_domain}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
params = {
|
search_results = list(search(base_domain, num_results=20, lang="it"))
|
||||||
"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()
|
|
||||||
|
|
||||||
|
base_urls = set()
|
||||||
for url in search_results:
|
for url in search_results:
|
||||||
element_url = get_base_url(url)
|
element_url = get_base_url(url)
|
||||||
if element_url:
|
if element_url:
|
||||||
|
@ -62,10 +62,10 @@
|
|||||||
"domain": "paris"
|
"domain": "paris"
|
||||||
},
|
},
|
||||||
"altadefinizionegratis": {
|
"altadefinizionegratis": {
|
||||||
"domain": "info"
|
"domain": "site"
|
||||||
},
|
},
|
||||||
"guardaserie": {
|
"guardaserie": {
|
||||||
"domain": "academy"
|
"domain": "meme"
|
||||||
},
|
},
|
||||||
"mostraguarda": {
|
"mostraguarda": {
|
||||||
"domain": "stream"
|
"domain": "stream"
|
||||||
|
@ -8,7 +8,7 @@ unidecode
|
|||||||
jsbeautifier
|
jsbeautifier
|
||||||
pathvalidate
|
pathvalidate
|
||||||
pycryptodomex
|
pycryptodomex
|
||||||
|
googlesearch-python
|
||||||
fake-useragent
|
fake-useragent
|
||||||
qbittorrent-api
|
qbittorrent-api
|
||||||
python-qbittorrent
|
python-qbittorrent
|
||||||
serpapi
|
|
Loading…
x
Reference in New Issue
Block a user