imseldrith commited on
Commit
3f8c4df
·
1 Parent(s): 1301b41

Upload 14 files

Browse files
Files changed (14) hide show
  1. .all-contributorsrc +84 -0
  2. .gitignore +34 -0
  3. .hintrc +10 -0
  4. Dockerfile +9 -0
  5. LICENSE +21 -0
  6. NEW_README.md +1 -0
  7. Procfile +1 -0
  8. app.json +61 -0
  9. bot.py +54 -0
  10. heroku.yml +5 -0
  11. renovate.json +6 -0
  12. requirements.txt +26 -0
  13. runtime.txt +1 -0
  14. sample_config.py +50 -0
.all-contributorsrc ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "projectName": "All-Url-Uploader",
3
+ "projectOwner": "kalanakt",
4
+ "repoType": "github",
5
+ "repoHost": "https://github.com",
6
+ "files": [
7
+ "README.md"
8
+ ],
9
+ "imageSize": 100,
10
+ "commit": false,
11
+ "commitConvention": "angular",
12
+ "contributors": [
13
+ {
14
+ "login": "kalanakt",
15
+ "name": "Hash Minner",
16
+ "avatar_url": "https://avatars.githubusercontent.com/u/86665964?v=4",
17
+ "profile": "https://github.com/kalanakt",
18
+ "contributions": [
19
+ "code",
20
+ "ideas",
21
+ "infra",
22
+ "maintenance",
23
+ "test"
24
+ ]
25
+ },
26
+ {
27
+ "login": "TAMILVIP007",
28
+ "name": "TAMILVIP007",
29
+ "avatar_url": "https://avatars.githubusercontent.com/u/79161058?v=4",
30
+ "profile": "http://www.tamilvip007.me",
31
+ "contributions": [
32
+ "code"
33
+ ]
34
+ },
35
+ {
36
+ "login": "ananth-28",
37
+ "name": "ananth-28",
38
+ "avatar_url": "https://avatars.githubusercontent.com/u/106482929?v=4",
39
+ "profile": "https://github.com/ananth-28",
40
+ "contributions": [
41
+ "code"
42
+ ]
43
+ },
44
+ {
45
+ "login": "Divarion-D",
46
+ "name": "Danil",
47
+ "avatar_url": "https://avatars.githubusercontent.com/u/42798043?v=4",
48
+ "profile": "https://t.me/Divarion_D",
49
+ "contributions": [
50
+ "code"
51
+ ]
52
+ },
53
+ {
54
+ "login": "millysboy",
55
+ "name": "millysboy",
56
+ "avatar_url": "https://avatars.githubusercontent.com/u/108298343?v=4",
57
+ "profile": "https://github.com/millysboy",
58
+ "contributions": [
59
+ "code",
60
+ "ideas"
61
+ ]
62
+ },
63
+ {
64
+ "login": "all-contributors",
65
+ "name": "All Contributors",
66
+ "avatar_url": "https://avatars.githubusercontent.com/u/46410174?v=4",
67
+ "profile": "https://allcontributors.org",
68
+ "contributions": [
69
+ "design"
70
+ ]
71
+ },
72
+ {
73
+ "login": "hybridvamp",
74
+ "name": "HYBRID",
75
+ "avatar_url": "https://avatars.githubusercontent.com/u/48980248?v=4",
76
+ "profile": "https://github.com/hybridvamp",
77
+ "contributions": [
78
+ "code"
79
+ ]
80
+ }
81
+ ],
82
+ "contributorsPerLine": 7,
83
+ "skipCi": true
84
+ }
.gitignore ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __pycache__/
2
+ dist/
3
+ downloads/
4
+ .vscode
5
+ *.log
6
+
7
+ # Docs
8
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
9
+
10
+ # dependencies
11
+ node_modules
12
+ .pnp
13
+ .pnp.js
14
+
15
+ # next.js
16
+ .next/
17
+ out/
18
+ build
19
+
20
+ # misc
21
+ .DS_Store
22
+ *.pem
23
+
24
+ # debug
25
+ npm-debug.log*
26
+ yarn-debug.log*
27
+ yarn-error.log*
28
+ .pnpm-debug.log*
29
+
30
+ # local env files
31
+ .env.local
32
+ .env.development.local
33
+ .env.test.local
34
+ .env.production.local
.hintrc ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "extends": [
3
+ "development"
4
+ ],
5
+ "hints": {
6
+ "disown-opener": "off",
7
+ "typescript-config/strict": "off",
8
+ "button-type": "off"
9
+ }
10
+ }
Dockerfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10.6-slim-buster
2
+
3
+ WORKDIR .
4
+ COPY . .
5
+
6
+ RUN pip3 install -r requirements.txt
7
+
8
+ CMD ["python3", "bot.py"]
9
+
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Hash Minner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
NEW_README.md ADDED
@@ -0,0 +1 @@
 
 
1
+ add your suggestion to write better readme and docs site
Procfile ADDED
@@ -0,0 +1 @@
 
 
1
+ web: gunicorn app:app & python3 bot.py
app.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Uploader-Bot-2.0",
3
+ "description": "Telegram's best Open Source Url Uploader Bot. Create your Fork now.",
4
+ "keywords": [
5
+ "telegram",
6
+ "best",
7
+ "yt-dlp",
8
+ "downloader",
9
+ "open",
10
+ "source",
11
+ "ffmpeg",
12
+ "remote",
13
+ "uploader"
14
+ ],
15
+ "website": "kalanakt.github.io/projects/telegram/all-url-uploader ",
16
+ "repository": "https://github.com/kalanakt/All-Url-Uploader",
17
+ "env": {
18
+ "WEBHOOK": {
19
+ "description": "Don't Need To change - Setting this to True when in env mode",
20
+ "value": "True"
21
+ },
22
+ "BOT_TOKEN": {
23
+ "description": "Your bot token, as a string.",
24
+ "value": ""
25
+ },
26
+ "API_ID": {
27
+ "description": "Get this value from https://my.telegram.org",
28
+ "value": ""
29
+ },
30
+ "API_HASH": {
31
+ "description": "Get this value from https://my.telegram.org",
32
+ "value": ""
33
+ },
34
+ "LOG_CHANNEL": {
35
+ "description": "Your Any Own Private Channel ID Where Your Bot As Admin With Full Permission",
36
+ "value": ""
37
+ },
38
+ "OWNER_ID": {
39
+ "description": "Your Telegram ID For Broadcast",
40
+ "value": "12345678"
41
+ },
42
+ "BOT_USERNAME": {
43
+ "description": "Your Bot Username Without @",
44
+ "value": ""
45
+ }
46
+ },
47
+ "addons": [
48
+ ],
49
+ "buildpacks": [{
50
+ "url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
51
+ }, {
52
+ "url": "heroku/python"
53
+ }],
54
+ "formation": {
55
+ "worker": {
56
+ "quantity": 1,
57
+ "size": "free"
58
+ }
59
+ }
60
+ }
61
+
bot.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MIT License
2
+
3
+ # Copyright (c) 2022 Hash Minner
4
+
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE
22
+
23
+ import os
24
+ from pyrogram import Client, idle
25
+
26
+ if bool(os.environ.get("WEBHOOK")):
27
+ from Uploader.config import Config
28
+ else:
29
+ from sample_config import Config
30
+
31
+ import os
32
+
33
+ import logging
34
+ logging.basicConfig(level=logging.DEBUG,
35
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
36
+ logger = logging.getLogger(__name__)
37
+
38
+ logging.getLogger("pyrogram").setLevel(logging.WARNING)
39
+
40
+ if __name__ == "__main__":
41
+
42
+ if not os.path.isdir(Config.DOWNLOAD_LOCATION):
43
+ os.makedirs(Config.DOWNLOAD_LOCATION)
44
+
45
+ plugins = dict(root="Uploader")
46
+ Uploadbot = Client("All-Url-Uploader",
47
+ bot_token=Config.BOT_TOKEN,
48
+ api_id=Config.API_ID,
49
+ api_hash=Config.API_HASH,
50
+ plugins=plugins)
51
+ logger.info("Bot Started :)")
52
+ Uploadbot.run()
53
+ idle()
54
+ logger.info("Bot Stoped ;)")
heroku.yml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ build:
2
+ docker:
3
+ worker: Dockerfile
4
+ run:
5
+ worker: python3 bot.py
renovate.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:base"
5
+ ]
6
+ }
requirements.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiohttp
2
+ beautifulsoup4
3
+ hachoir
4
+ numpy
5
+ Pillow
6
+ pyrogram==2.0.43
7
+ requests
8
+ tgcrypto
9
+ olefile
10
+ motor
11
+ pymongo
12
+ dnspython
13
+ psutil
14
+ loggers
15
+ filetype
16
+ tldextract
17
+ aiofiles
18
+ pyromod
19
+ yt-dlp
20
+ filesplit==4.0.0
21
+ mega.py
22
+ opencc
23
+ wget
24
+ youtube_dl
25
+ Flask==2.2.2
26
+ gunicorn==20.1.0
runtime.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ python-3.10.5
sample_config.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MIT License
2
+
3
+ # Copyright (c) 2022 Hash Minner
4
+
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE
22
+
23
+ # edit this file with your veriable if you'r deploy bot via locally | vps
24
+
25
+ class Config(object):
26
+
27
+ # get a token from @BotFather
28
+ BOT_TOKEN = "5861303607:AAFG4OpuZNNw0y9PleIa-rezwK6aKu4kDnk"
29
+
30
+ # Get these values from my.telegram.org
31
+ API_ID = 2276460
32
+ API_HASH = "1ee636feaecb523f12c844416dda70e3"
33
+
34
+ # No need to change
35
+ DOWNLOAD_LOCATION = "./DOWNLOADS"
36
+ ADL_BOT_RQ = {}
37
+ CHUNK_SIZE = 128
38
+ TG_MAX_FILE_SIZE = 4194304000
39
+ HTTP_PROXY = ""
40
+ PROCESS_MAX_TIMEOUT = 3700
41
+
42
+ # TG Ids
43
+ LOG_CHANNEL = -1001874739413
44
+ OWNER_ID = 1361863347
45
+
46
+ # bot username without @
47
+ BOT_USERNAME = "upload_urls_bot"
48
+
49
+ # auth users
50
+ AUTH_USERS = [OWNER_ID]