Notes
![]() ![]() Notes - notes.io |
import time
URL = 'https://egov.uscis.gov/casestatus/mycasestatus.do?appReceiptNum='
startReceipt = 1790211653
myReceipt = 1790211683
howManyCases = 100
serviceCenter = 'YSC'
receipts = []
status = []
waitingString = 'Case Was Received'
produceString = 'New Card Is Being Produced'
mailString = 'Card Was Mailed To Me'
#should return pending/being produced/sent out
def fetchResult(receipt):
requestURL = URL + receipt
r = requests.get(requestURL)
returnBody = r.content
if waitingString in returnBody:
return 'waiting'
elif produceString in returnBody:
return 'produced'
elif mailString in returnBody:
return 'mailed'
else:
return 'what?'
def calStatistic(status):
totalCases = len(status)
concateStr = '|'.join(status)
#print 'Wait: ' + str(concateStr.count('waiting'))
print 'nProduced: ' + str(concateStr.count('produced'))
print 'Mailed: ' + str(concateStr.count('mailed'))
print 'total: ' + str(totalCases)
#print 'Error: ' + str(concateStr.count('what'))
def populateReceipts(howManyCases, startReceipt):
for i in xrange(howManyCases):
receipts.append(serviceCenter + str(startReceipt + i))
if __name__ == "__main__":
populateReceipts(howManyCases, startReceipt)
for receipt in receipts:
status.append(receipt + '|' + fetchResult(receipt))
for eachcase in status:
print eachcase
calStatistic(status)
now = time.strftime("%c")
print 'nMy Case: ' + fetchResult(serviceCenter + str(myReceipt))
print ("Current time %s" % now )
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team