Skip to content

Read METAR, SPECI and Taf then send to Line application

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt
Notifications You must be signed in to change notification settings

kanutsanun-b/nsbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nsbot version 0.0.4

Using Selenium read MEATR ,SPECI and TAF from NSWEB. Update:

  • Memory consuming was solved by using web-function embeded
  • Only one class for reading METAR/SPECI and TAF
  • Total time per loop is 1 minute

Installation

Use the package manager pip to install nsbot.

pip install nsbot
or
pip install nsbot==0.0.3

Usage

from nsbot import MetarSpeciTaf

chrome_driver=".exe" #location of [chrome_driver.exe]
line_token=""
time_stop="04" #UTC time

obj = MetarSpeciTaf(chrome_driver,line_token, time_stop)
obj.setupDriver()
obj.run_bot()

Note

To hide chromeDriver console in python

Step1: Find service.py in your selenium directory

Lib\site-packages\selenium\webdriver\common\service.py

Step2: Edit the Start() function by adding the creation flags (creationflags=CREATE_NO_WINDOW)

def start(self):
    """
    Starts the Service.

    :Exceptions:
     - WebDriverException : Raised either when it can't start the service
       or when it can't connect to the service
    """
    try:
        cmd = [self.path]
        cmd.extend(self.command_line_args())
        self.process = subprocess.Popen(cmd, env=self.env,
               close_fds=platform.system() != 'Windows',
               stdout=self.log_file,
               stderr=self.log_file, 
               creationflags=CREATE_NO_WINDOW)
    except TypeError:

Step3: Add the relevant imports to service.py

from win32process import CREATE_NO_WINDOW

!!! You need to download chromDriver which is suitable with your systems.

License

MIT

...... ......
email kanutsanun.b@gmail.com
Build README https://dillinger.io/

About

Read METAR, SPECI and Taf then send to Line application

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages