SearchX bot
1.0.0
- [ Project Discontinued and Repo Dead ]
이것은 드라이브에서 파일을 검색하기 위해 Python으로 작성된 텔레그램 봇입니다.
git clone https://github.com/SVR666/SearchX-bot search-bot/
cd search-bot
sudo apt install python3
sudo snap install docker
sudo pacman -S docker python
cp config_sample.env config.env
_____REMOVE_THIS_LINE_____=True
나머지 필드를 채우세요. 각 필드의 의미는 아래에 설명되어 있습니다.
python3 telegraph_token.py
재귀 검색이 불가능한 이전 버전에서 오시는 경우, 다시 Driveid.py를 실행하여 이전 콘텐츠를 모두 삭제해야 하며, 이번에는 드라이브(Teamdrive 또는 메인 드라이브의 경우 '루트')만 추가하면 됩니다. 자세한 내용은 아래 섹션을 참조하세요.
봇은 하위 디렉터리에서 검색할 수 없지만 검색하려는 디렉터리를 지정할 수 있습니다.
이제 봇은 하위 디렉터리에서 검색할 수 있으므로 사용하려는 팀 드라이브를 지정하기만 하면 됩니다. 메인 드라이브를 사용하려면 드라이브 ID에 'root'를 입력하면 됩니다.
각 ID에 해당하는 드라이브 이름(원하는 것), 드라이브 ID 및 인덱스 URL(선택 사항)을 추가합니다.
폴더 ID를 추가하고 색인 URL을 사용하려면 해당 폴더에 해당하는 색인 URL을 추가하세요. 지금은 폴더 ID를 입력하지 말고 Teamdrive ID만 입력하세요.
Driveid.py를 실행하고 화면을 따르세요.
python3 driveid.py
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py
heroku login
heroku create appname
heroku git:remote -a appname
heroku stack:set container
git add -f credentials.json token.pickle config.env heroku.yml drive_folder
git commit -m "Added Creds."
git push heroku master --force
heroku ps:scale worker=0
heroku ps:scale worker=1
Heroku-참고: heroku는 임시 파일 시스템을 사용하므로 텔레그램을 통한 인증( /authorize 명령) 수행은 영구적이지 않습니다. 각 dyno 부팅 시 재설정됩니다. 해결 방법으로 다음을 수행할 수 있습니다.
git add authorized_chats.txt -f
git commit -asm "Added hardcoded authorized_chats.txt"
git push heroku heroku:master
sudo dockerd
sudo docker build . -t search-bot
sudo docker run search-bot