t*x
2 楼
由于查不到状态,所以没法在 uscis 设置 email alert。 导致每天不停刷屏,非常影
响工作效率。
写了一个python script。 状态变了可以自动发email提醒。有兴趣的可以拿去用。
需要自己改caseId, toaddress. 最好发信的email address 和密码 fromaddress也用
自己的。
现在的设置每 10分钟check一次。
非码工,纯业余爱好,高手莫见笑。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import re
import smtplib
import time
from email.mime.text import MIMEText
statusP = re.compile('Your Case Status:
([ws/]*?)')
fromaddress = "t**********[email protected]" ## (Have to be a gmail account.
Suggest to use your own gmail account and password. )
frompassword = "telanxserver?"
toaddress = "t**********[email protected]" ## (put your own email address to
receive the update)
caseId = 'src1490267734'
def email(status):
msg = MIMEText("Status Changed to " + str(status))
msg['Subject'] = 'Status Changed to ' + str (status)
msg['From'] = fromaddress
msg['to'] = toaddress
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.login(fromaddress,frompassword)
server.sendmail(fromaddress, toaddress, msg.as_string())
server.quit()
def scan():
req = urllib2.Request("https://egov.uscis.gov/cris/Dashboard/CaseStatus.
do?appReceiptNum=" + caseId)
response = urllib2.urlopen(req)
html = response.read()
status = statusP.search(html)
if status:
return status.group(1).strip()
else:
return "case not found"
def notification():
status = scan()
while True:
time.sleep(600)
status_new = scan()
if status_new != status:
print "Status changed to: %s. Go check it out at the USCIS
website"%status_new
email(status_new)
break
else:
status = status_new
print 'Current status: %s. No change yet'%status
notification()
响工作效率。
写了一个python script。 状态变了可以自动发email提醒。有兴趣的可以拿去用。
需要自己改caseId, toaddress. 最好发信的email address 和密码 fromaddress也用
自己的。
现在的设置每 10分钟check一次。
非码工,纯业余爱好,高手莫见笑。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import re
import smtplib
import time
from email.mime.text import MIMEText
statusP = re.compile('Your Case Status:
([ws/]*?)')
fromaddress = "t**********[email protected]" ## (Have to be a gmail account.
Suggest to use your own gmail account and password. )
frompassword = "telanxserver?"
toaddress = "t**********[email protected]" ## (put your own email address to
receive the update)
caseId = 'src1490267734'
def email(status):
msg = MIMEText("Status Changed to " + str(status))
msg['Subject'] = 'Status Changed to ' + str (status)
msg['From'] = fromaddress
msg['to'] = toaddress
server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo()
server.starttls()
server.login(fromaddress,frompassword)
server.sendmail(fromaddress, toaddress, msg.as_string())
server.quit()
def scan():
req = urllib2.Request("https://egov.uscis.gov/cris/Dashboard/CaseStatus.
do?appReceiptNum=" + caseId)
response = urllib2.urlopen(req)
html = response.read()
status = statusP.search(html)
if status:
return status.group(1).strip()
else:
return "case not found"
def notification():
status = scan()
while True:
time.sleep(600)
status_new = scan()
if status_new != status:
print "Status changed to: %s. Go check it out at the USCIS
website"%status_new
email(status_new)
break
else:
status = status_new
print 'Current status: %s. No change yet'%status
notification()
j*t
3 楼
Sky light looks like a window to me, while sun tunnle is just like a big
light. But looks like sun tunnle is the new trend. Any recommendations, sky
light or sun tunnel?
light. But looks like sun tunnle is the new trend. Any recommendations, sky
light or sun tunnel?
c*n
4 楼
i*e
5 楼
买过,没问题
r*3
6 楼
牛啊。 但是crazy, scan every 10 minutes.
【在 t****x 的大作中提到】
: 由于查不到状态,所以没法在 uscis 设置 email alert。 导致每天不停刷屏,非常影
: 响工作效率。
: 写了一个python script。 状态变了可以自动发email提醒。有兴趣的可以拿去用。
: 需要自己改caseId, toaddress. 最好发信的email address 和密码 fromaddress也用
: 自己的。
: 现在的设置每 10分钟check一次。
: 非码工,纯业余爱好,高手莫见笑。
: #!/usr/bin/env python
: # -*- coding: utf-8 -*-
: import urllib2
【在 t****x 的大作中提到】
: 由于查不到状态,所以没法在 uscis 设置 email alert。 导致每天不停刷屏,非常影
: 响工作效率。
: 写了一个python script。 状态变了可以自动发email提醒。有兴趣的可以拿去用。
: 需要自己改caseId, toaddress. 最好发信的email address 和密码 fromaddress也用
: 自己的。
: 现在的设置每 10分钟check一次。
: 非码工,纯业余爱好,高手莫见笑。
: #!/usr/bin/env python
: # -*- coding: utf-8 -*-
: import urllib2
b*n
7 楼
If the goal is to bring in more natural light, sun tunnel is MUCH cheaper.
Sky lights look much better, but more expensive and harder to maintain.
sky
【在 j***t 的大作中提到】
: Sky light looks like a window to me, while sun tunnle is just like a big
: light. But looks like sun tunnle is the new trend. Any recommendations, sky
: light or sun tunnel?
Sky lights look much better, but more expensive and harder to maintain.
sky
【在 j***t 的大作中提到】
: Sky light looks like a window to me, while sun tunnle is just like a big
: light. But looks like sun tunnle is the new trend. Any recommendations, sky
: light or sun tunnel?
i*e
9 楼
买过,没问题
h*g
11 楼
俺家是Sun Tunnel,很好呀,当时没选sky light是因为有人说容易漏和下雨的时候声
音比较大。 当然了,晴天的时候能在屋子里看蓝天白云肯定很爽。
音比较大。 当然了,晴天的时候能在屋子里看蓝天白云肯定很爽。
s*e
12 楼
LOL
f*g
13 楼
Marketplace? No.
x*r
14 楼
Orz
t*u
16 楼
哈哈 哈
y*u
18 楼
没懂,查不到状态还刷什么刷啊?
c*3
20 楼
zan
j*t
21 楼
a*7
22 楼
怎么用?
s*n
24 楼
码农很强大!!!
v*z
25 楼
I have sun tunnel and skylight both.
skylight is good looking in room, sun tunnel is good for more light.
labor free.
skylight is good looking in room, sun tunnel is good for more light.
labor free.
T*r
26 楼
我也想开个天窗,可是问到的价钱都是2500起价,敢问那人工700的quote可不可以
share下?多谢•
share下?多谢•
j*3
27 楼
多谢答疑。我们的问题不是不够亮,是不够阳光。Living room有一大扇朝北的落地窗
,光线肯定够,
但是终年不进阳光,阴冷,can sun tunnel serve this purpose? 用skylight的话必
须开很
大才好看,说是要动三根大梁,抖~~~~,maybe I should repair the firebox
instead?
【在 b*********n 的大作中提到】
: skylight 据说比较容易漏水
: sun tunnel 好像几百块就有一个,一个天窗可能要一千块。
: 客厅的话,装sun tunnel可能不大方。一般看到sun tunnel 都试装在比较小的地方,
: 譬如走道,浴室,玄关。
,光线肯定够,
但是终年不进阳光,阴冷,can sun tunnel serve this purpose? 用skylight的话必
须开很
大才好看,说是要动三根大梁,抖~~~~,maybe I should repair the firebox
instead?
【在 b*********n 的大作中提到】
: skylight 据说比较容易漏水
: sun tunnel 好像几百块就有一个,一个天窗可能要一千块。
: 客厅的话,装sun tunnel可能不大方。一般看到sun tunnel 都试装在比较小的地方,
: 譬如走道,浴室,玄关。
v*z
28 楼
skylight的话必须开很大才好看,说是要动三根大梁.
true!!
that is what I did.
true!!
that is what I did.
相关阅读