Answers for "whats my location"

17

what's my location

Mars
Posted by: Guest on August-03-2021
1

whats my location

#find location app by ip python

import PySimpleGUI as sg
import geocoder
import folium
import os
import webbrowser
import pyttsx3


def input1(ip):
    engine = pyttsx3.init()
    path = os.path.abspath("my_map.html")

    g = geocoder.ip(ip)

    myAddress = g.latlng

    my_map1 = folium.Map(location=myAddress,
                         zoom_start=12)

    folium.Marker(location=myAddress).add_to(my_map1)

    my_map1.save("my_map.html")
    engine.say("Processing")
    engine.say("Finding your target location!")
    engine.runAndWait()
    webbrowser.open(path, new=2)


sg.theme('BlueMono')
layout = [[sg.Text('Enter the victim ip'), sg.InputText()],
          [sg.Button('Ok'), sg.Button('Cancel')]]

window = sg.Window('Find Location', layout)

while True:
    event, values = window.Read()
    if event in (None, 'Cancel'):
        engine = pyttsx3.init()
        engine.say("Ok!, bye for now!")
        engine.runAndWait()
        break
    if event == 'Ok':
        input1(values[0])

window.Close()
Posted by: Guest on September-20-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language