Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. def updatedomain(self, ns_record_id):
  2.     content = 'domain={0}&ns_record_id={1}&ns_rec_type=A&ns_subdomain=%40&ns_weight=&ns_port=&ns_content={2}&ns_priority=1'
  3.     content = content.format(self._domain, ns_record_id, self._externalip)
  4.  
  5.     connection = httplib.HTTPSConnection('pdd.yandex.ru')
  6.     connection.request('POST', '/ajax/ns_simple_record_edit.ajax.xml', content,\
  7.                       {'Accept': 'application/json, text/javascript, */*',\
  8.                        'Cookie': self.getcookies()})
  9.     response = connection.getresponse()
  10.     response.close()




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2018