python(phone)模組獲取手機號歸屬地、區號、運營商等
二、安裝phone模組,
pip install phone
三、測試**如下:
from phone import phoneif __name__ == "__main__":
phonenum = '17613394466'
info = phone().find(phonenum)
print(info)
try:
phone = info['phone']
province = info['province']
city = info['city']
zip_code = info['zip_code']
area_code = info['area_code']
phone_type = info['phone_type']
except:
print('none')
四、批量查詢excle中已有的**號
from phone import phoneimport xlrd
import xlwt
def get_excel_data():
file = './tel.xlsx' #**號碼儲存的excle表
re1 = xlrd.open_workbook(file)
outwb = xlwt.workbook() #建立工作簿
# print(type(outwb))
outws = outwb.add_sheet("new") #在工作簿中新建乙個工作表new
# print(type(outws))
# 讀取第乙個sheet
ws = re1.sheet_by_index(0)
rows = ws.nrows
# print(rows)
outws.write(0, 0, u'**號') #給新錶的第一行新增對應的標籤
outws.write(0, 1, u'省份')
outws.write(0, 2, u'城市')
outws.write(0, 3, u'區號')
outws.write(0, 4, u'運營商')
for i in range(0, rows):
telvalue = int(ws.cell_value(i, 0))
# print(telvalue)
data = phone().find(telvalue)
print(data)
outws.write(i + 1, 0, telvalue) #給新錶的個列新增對應的資料
try:
outws.write(i + 1, 1, data['province'])
outws.write(i + 1, 2, data['city'])
outws.write(i + 1, 3, data['area_code'])
outws.write(i + 1, 4, data['phone_type'])
outwb.s**e(r'new_tel.xls')
except:
print("none")
get_excel_data()
python(phone)模組獲取手機號歸屬地、區號、運營商等
二、安裝phone模組,
pip install phone
三、測試**如下:
from phone import phoneif __name__ == "__main__":
phonenum = '17613394466'
info = phone().find(phonenum)
print(info)
try:
phone = info['phone']
province = info['province']
city = info['city']
zip_code = info['zip_code']
area_code = info['area_code']
phone_type = info['phone_type']
except:
print('none')
四、批量查詢excle中已有的**號
from phone import phoneimport xlrd
import xlwt
def get_excel_data():
file = './tel.xlsx' #**號碼儲存的excle表
re1 = xlrd.open_workbook(file)
outwb = xlwt.workbook() #建立工作簿
# print(type(outwb))
outws = outwb.add_sheet("new") #在工作簿中新建乙個工作表new
# print(type(outws))
# 讀取第乙個sheet
ws = re1.sheet_by_index(0)
rows = ws.nrows
# print(rows)
outws.write(0, 0, u'**號') #給新錶的第一行新增對應的標籤
outws.write(0, 1, u'省份')
outws.write(0, 2, u'城市')
outws.write(0, 3, u'區號')
outws.write(0, 4, u'運營商')
for i in range(0, rows):
telvalue = int(ws.cell_value(i, 0))
# print(telvalue)
data = phone().find(telvalue)
print(data)
outws.write(i + 1, 0, telvalue) #給新錶的個列新增對應的資料
try:
outws.write(i + 1, 1, data['province'])
outws.write(i + 1, 2, data['city'])
outws.write(i + 1, 3, data['area_code'])
outws.write(i + 1, 4, data['phone_type'])
outwb.s**e(r'new_tel.xls')
except:
print("none")
get_excel_data()
Phone漂亮的動畫
此處標明非原創 實現iphone漂亮的動畫效果主要有兩種方法,一種是uiview層面的,一種是使用catransition進行更低層次的控制,cpp uiview beginanimations curl context nil 動畫開始 uiview setanimationduration 0....
神奇的中醫!神奇的文化!
本草備要 中載 王荊公患偏頭痛,搗萊服汁,仰臥,左痛注右鼻,右痛注左鼻,或兩鼻齊注,數十年患,二註而愈。其中所說萊菔汁就是蘿蔔汁。上邊這段話好人的部落格上都有,但是不知道有幾個人嘗試過,我因長期患偏頭疼終無良方,今天下定決心試上一試,據說中西醫對 頭疼均沒有什麼特效藥物,於是我的偏頭疼也伴隨我十幾年...
A500的dial過程選擇phone
在自己寫的apk中發現當發出activity intent 之後會跳出需要在兩個phone之間選擇,這個選擇會影響後面的hangup,hangup中需要相應的phone來匹配。outgoingcallreceiver是負責處理發過來的intent的,在它的doreceive裡 int siminde...