Fmt & update docs

This commit is contained in:
mhdzumair
2025-01-25 17:59:48 +05:30
parent 69e6f7a833
commit c26360b5e8
6 changed files with 24 additions and 28 deletions
+9 -10
View File
@@ -238,14 +238,13 @@ Benefits:
Ideal for users who want a reliable, plug-and-play solution without the technical overhead of self-hosting. Ideal for users who want a reliable, plug-and-play solution without the technical overhead of self-hosting.
### Option 3: Hugging Face Space Deployment (Unofficial) ### Option 3: Hugging Face Space Deployment (Guide from a MediaFlow Contributor)
1. Go to this repo and create a fork: https://github.com/UrloMythus/UnHided 1. Go to this repo and create a fork: https://github.com/UrloMythus/UnHided
2. Signup or Login to Hugging Face https://huggingface.co/ 2. Sign up or log in to Hugging Face: https://huggingface.co/
3. Create a new space with random name https://huggingface.co/new-space. Choose docker as SDK and blank template and public visibility. 3. Create a new space with a random name: https://huggingface.co/new-space. Choose Docker as SDK and blank template and public visibility.
4. Goto "Settings" tab and create a new secret with name `API_PASSWORD` and set the value to your desired password. 4. Go to the "Settings" tab and create a new secret with the name `API_PASSWORD` and set the value to your desired password.
5. Goto "Files" tab and create a new file with name `Dockerfile` and paste the following content. After that replace ``` YourUsername/YourRepoName``` in the Dockerfile with your Username and the name of your fork. Finally click on "Commit" to save the changes. Remember your space might get banned if instead of using your fork you use the main repo. 5. Go to the "Files" tab and create a new file with the name `Dockerfile` and paste the following content. After that, replace `YourUsername/YourRepoName` in the Dockerfile with your username and the name of your fork. Finally, click on "Commit" to save the changes. Remember, your space might get banned if instead of using your fork, you use the main repo.
```dockerfile ```dockerfile
FROM python:3.10-slim-buster FROM python:3.10-slim-buster
WORKDIR /app WORKDIR /app
@@ -259,10 +258,10 @@ Ideal for users who want a reliable, plug-and-play solution without the technica
EXPOSE 7860 EXPOSE 7860
CMD ["uvicorn", "run:main_app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"] CMD ["uvicorn", "run:main_app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]
``` ```
6. Wait until the space gets built and deployed. 6. Wait until the space gets built and deployed.
7. If the space is deployed successfully, you can click on the three dots in the top right corner and click on "Embed this space" and copy "Direct URL". 7. If the space is deployed successfully, you can click on the three dots in the top right corner and click on "Embed this space" and copy the "Direct URL".
8. In order to update your proxy to newest release go to your Github Fork and click on Sync. After that hop on your Hugging Face Space -> Settings and click on Factory Rebuild. 8. To update your proxy to the newest release, go to your GitHub fork and click on Sync. After that, hop on your Hugging Face Space -> Settings and click on Factory Rebuild.
8. Use the above URL and API password on support addons like MediaFusion, MammaMia, Jackettio, etc. 9. Use the above URL and API password on support addons like MediaFusion, MammaMia, Jackettio, etc.
## Usage ## Usage
+3 -5
View File
@@ -3,15 +3,13 @@ from typing import Dict, Type
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError
from mediaflow_proxy.extractors.doodstream import DoodStreamExtractor from mediaflow_proxy.extractors.doodstream import DoodStreamExtractor
from mediaflow_proxy.extractors.livetv import LiveTVExtractor from mediaflow_proxy.extractors.livetv import LiveTVExtractor
from mediaflow_proxy.extractors.maxstream import MaxstreamExtractor
from mediaflow_proxy.extractors.mixdrop import MixdropExtractor from mediaflow_proxy.extractors.mixdrop import MixdropExtractor
from mediaflow_proxy.extractors.uqload import UqloadExtractor from mediaflow_proxy.extractors.okru import OkruExtractor
from mediaflow_proxy.extractors.streamtape import StreamtapeExtractor from mediaflow_proxy.extractors.streamtape import StreamtapeExtractor
from mediaflow_proxy.extractors.supervideo import SupervideoExtractor from mediaflow_proxy.extractors.supervideo import SupervideoExtractor
from mediaflow_proxy.extractors.uqload import UqloadExtractor
from mediaflow_proxy.extractors.vixcloud import VixCloudExtractor from mediaflow_proxy.extractors.vixcloud import VixCloudExtractor
from mediaflow_proxy.extractors.okru import OkruExtractor
from mediaflow_proxy.extractors.maxstream import MaxstreamExtractor
class ExtractorFactory: class ExtractorFactory:
+1 -1
View File
@@ -1,6 +1,6 @@
import re import re
import string
from typing import Dict, Any from typing import Dict, Any
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError
+3 -4
View File
@@ -1,10 +1,9 @@
import re
from bs4 import BeautifulSoup, SoupStrainer
import json import json
from typing import Dict, Any from typing import Dict, Any
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError from bs4 import BeautifulSoup, SoupStrainer
from mediaflow_proxy.extractors.base import BaseExtractor
class OkruExtractor(BaseExtractor): class OkruExtractor(BaseExtractor):
+1 -1
View File
@@ -1,7 +1,7 @@
import re import re
from typing import Dict, Any from typing import Dict, Any
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError from mediaflow_proxy.extractors.base import BaseExtractor
class SupervideoExtractor(BaseExtractor): class SupervideoExtractor(BaseExtractor):
+7 -7
View File
@@ -1,10 +1,11 @@
import json
import re import re
from typing import Dict, Any from typing import Dict, Any
from urllib.parse import urlparse, parse_qs
from bs4 import BeautifulSoup, SoupStrainer from bs4 import BeautifulSoup, SoupStrainer
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError
import json
from urllib.parse import urlparse, parse_qs
from urllib.parse import urlparse, parse_qs
class VixCloudExtractor(BaseExtractor): class VixCloudExtractor(BaseExtractor):
@@ -16,13 +17,12 @@ class VixCloudExtractor(BaseExtractor):
async def version(self, domain: str) -> str: async def version(self, domain: str) -> str:
"""Get version of VixCloud Parent Site.""" """Get version of VixCloud Parent Site."""
DOMAIN = domain base_url = f"https://streamingcommunity.{domain}/richiedi-un-titolo"
base_url = f"https://streamingcommunity.{DOMAIN}/richiedi-un-titolo"
response = await self._make_request( response = await self._make_request(
base_url, base_url,
headers={ headers={
"Referer": f"https://streamingcommunity.{DOMAIN}/", "Referer": f"https://streamingcommunity.{domain}/",
"Origin": f"https://streamingcommunity.{DOMAIN}", "Origin": f"https://streamingcommunity.{domain}",
}, },
) )
if response.status_code != 200: if response.status_code != 200: