_inboxRe = re.compile(r"""<td>.*?(voicemail|received|missed|call return).*?</td>\s+<td>\s+<font size="2">\s+(.*?)\s+ \| \s+<a href="/mobile/contacts/.*?">(.*?)\s?</a>\s+<br/>\s+(.*?)\s?<a href=""", re.S)
_contactsRe = re.compile(r"""<a href="/mobile/contacts/detail/(\d+)">(.*?)</a>""", re.S)
_contactsNextRe = re.compile(r""".*<a href="/mobile/contacts(\?page=\d+)">Next</a>""", re.S)
- _contactDetailGroupRe = re.compile(r"""Group:\s*(\w*)""", re.S)
_contactDetailPhoneRe = re.compile(r"""(\w+):[0-9\-\(\) \t]*?<a href="/mobile/calls/click_to_call\?destno=(\d+).*?">call</a>""", re.S)
_validateRe = re.compile("^[0-9]{10,}$")
try:
forwardSelectionPage = self._browser.download(GCDialer._forwardselectURL)
except urllib2.URLError, e:
- raise RuntimeError("%s is not accesible" % GCDialer._clicktocallURL)
+ raise RuntimeError("%s is not accesible" % GCDialer._forwardselectURL)
self._browser.cookies.save()
if GCDialer._isLoginPageRe.search(forwardSelectionPage) is None:
try:
loginSuccessOrFailurePage = self._browser.download(GCDialer._loginURL, loginPostData)
except urllib2.URLError, e:
- raise RuntimeError("%s is not accesible" % GCDialer._clicktocallURL)
+ raise RuntimeError("%s is not accesible" % GCDialer._loginURL)
return self.is_authed()
try:
callbackSetPage = self._browser.download(GCDialer._setforwardURL, callbackPostData)
except urllib2.URLError, e:
- raise RuntimeError("%s is not accesible" % GCDialer._clicktocallURL)
+ raise RuntimeError("%s is not accesible" % GCDialer._setforwardURL)
self._browser.cookies.save()
return True
try:
recentCallsPage = self._browser.download(GCDialer._inboxallURL)
except urllib2.URLError, e:
- raise RuntimeError("%s is not accesible" % GCDialer._clicktocallURL)
+ raise RuntimeError("%s is not accesible" % GCDialer._inboxallURL)
for match in self._inboxRe.finditer(recentCallsPage):
phoneNumber = match.group(4)
try:
contactsPage = self._browser.download(contactsPageUrl)
except urllib2.URLError, e:
- raise RuntimeError("%s is not accesible" % GCDialer._clicktocallURL)
+ raise RuntimeError("%s is not accesible" % contactsPageUrl)
for contact_match in self._contactsRe.finditer(contactsPage):
contactId = contact_match.group(1)
contactName = contact_match.group(2)
try:
detailPage = self._browser.download(GCDialer._contactDetailURL + '/' + contactId)
except urllib2.URLError, e:
- raise RuntimeError("%s is not accesible" % GCDialer._clicktocallURL)
+ raise RuntimeError("%s is not accesible" % GCDialer._contactDetailURL)
for detail_match in self._contactDetailPhoneRe.finditer(detailPage):
phoneType = detail_match.group(1)