You are not logged in.
Hey all
I want to share a self made python script that shows the number of new emails from a standard Yahoo account (no Plus). I made it mostly for Conky .
It's only dependency is zope.testbrowser package from PyPI. You can install it with easy_install.
#!/usr/bin/env python
import string
from zope.testbrowser.browser import Browser
username = 'yourU'
password = 'yourP'
url = 'http://m.yahoo.com/w/ygo-mail/home.bp?.intl=EN&.lang=EN'
browser = Browser(url)
form = browser.getForm(id='LoginModel')
form.getControl(name='id').value = username
form.getControl(name='password').value = password
form.submit('Sign in')
temp = browser.contents
index=string.find(temp,'Inbox (')
index2=string.find(temp,')</font>')
try:
print str(int(temp[index+7:index2]))
except:
print '0'
Soon, I'll make an AUR package.
I think it's kind of insecure, but if you know any way to make it more reliable, please let me know.
I would appreciate any comments (this is my first script that goes to the community).
Cheers,
Mirhciulica
Offline
Looks fine to me. Unfortunately, I use gmail.
Offline