🌎 گرفتن موقعیت مکانی با زبان پایتون
import requests
ip_request = requests.get('https://get.geojs.io/v1/ip.json')
my_ip = ip_request.json()['ip']
print(my_ip)
geo_request_url = 'https://get.geojs.io/v1/ip/geo/' + my_ip + '.json'
geo_request = requests.get(geo_request_url)
geo_data = geo_request.json()
print(geo_data)
#آموزش #شماره4 #تمرین #کد
#Code
🐍 @PythonForever
import requests
ip_request = requests.get('https://get.geojs.io/v1/ip.json')
my_ip = ip_request.json()['ip']
print(my_ip)
geo_request_url = 'https://get.geojs.io/v1/ip/geo/' + my_ip + '.json'
geo_request = requests.get(geo_request_url)
geo_data = geo_request.json()
print(geo_data)
#آموزش #شماره4 #تمرین #کد
#Code
🐍 @PythonForever
📩 آموزش دسترسی به SMTP در جیمیل بوسیله پایتون
📫 How to Access SMTP in Gmail with Python
from smtplib import SMTP
host="smtp.gmail.com"
port= 587
username= "[email protected]"
password= "abc123"
from_email= username
to_list= ("[email protected]", "[email protected]")
CON= SMTP(host, port)
CON.starttls()
CON.login(username, password)
CON.sendmail(from_email, to_list, "Hey")
CON.quit()
#آموزش #شماره5 #تمرین #کد #جی_میل
#Code #SMTP #Gmail
🐍 @PythonForever
📫 How to Access SMTP in Gmail with Python
from smtplib import SMTP
host="smtp.gmail.com"
port= 587
username= "[email protected]"
password= "abc123"
from_email= username
to_list= ("[email protected]", "[email protected]")
CON= SMTP(host, port)
CON.starttls()
CON.login(username, password)
CON.sendmail(from_email, to_list, "Hey")
CON.quit()
#آموزش #شماره5 #تمرین #کد #جی_میل
#Code #SMTP #Gmail
🐍 @PythonForever