• 09-12-2021, 07:25:04
    #1
    merhaba

    5dakikada bir otomatik veriyi çekip bildiriyor ben bunu komut sistemi ile yapmak istiyorum yardımcı olurmusuz ücreti ile şimdiden teşekkürler

    import telegram
    import schedule
    import time
    import datetime as dt
    
    from urllib.request import urlopen
    from bs4 import BeautifulSoup
    import json
    
    
    API_Token = '-------'
    Chat_Id = '----'
    bot = telegram.Bot(token = API_Token)
    
    funding_history_before_btc = 0
    funding_history_before_usdt = 0
    long_history_before_btc = 0
    short_history_before_btc = 0
    btcusdt = 0
    
    
    
    def telegram_send_message(telegram_message):
        try:
            bot.send_message(chat_id = Chat_Id, text = telegram_message)
    
        except:
            print('bot_send_Error\n')
    
    def job():
        
        the_message = ''
        now = dt.datetime.now()
        now_minutes = now.minute
        the_message = "current time = " + str(now)
    
        if(now_minutes % 5 == 0):
            the_message = longshort_ratio_func()
            if(the_message != ""):
                telegram_send_message(the_message)
  • 09-12-2021, 08:01:08
    #2
    Python İle İlgilenen Birisi Olarak, Konuyu Takip Ediyorum İzninizle
  • 09-12-2021, 09:48:33
    #3
    pyinstaller kütüphanesi ile exe ye çevirip çalıştırabilirsiniz. Çok basit isterseniz kendiniz bir bakın.
  • 09-12-2021, 09:55:41
    #4
    Veya windows işletim sistemi kullanıyorsanız cmd ile çalıştıracağınız dosyanın bulunduğu dizine gidip
    python ornek.py
    komutu ile istediğiniz python dosyasını terminal üzerinden çalıştırabilirsiniz.
  • 09-12-2021, 10:16:41
    #5
    @RadloF; merhaba. Selenium kütüophanesi kullanmanız gerekir. 🙂
  • 09-12-2021, 19:45:29
    #6
    En iyisi sanırım
    Herkes farklı bir şey söylemiş tam olarak kast ettiğiniz şey bu mu değil mi emin değilim ancak.
    telegram_send_message(the_message)
    bu kısmı silip
    print(the_message)
    Şeklinde değiştirip çalıştırmanız yeterli.