Write url_data.url.
760233
def write_real (self, url_data):
        """"""
        self.write(self.part("realurl") + self.spaces("realurl"))
        self.writeln(unicode(url_data.url), color=self.colorreal)
947756
def make_key_url(self, key):
        """"""
        if type(key) is bytes:
            key = key.decode('utf-8')
        buf = io.StringIO()
        buf.write(u'keys')
        if not key.startswith(u'/'):
            buf.write(u'/')
        buf.write(key)
        return self.make_url(buf.getvalue())
99868
def build_url(self, *args, **kwargs):
        """"""
        parts = [kwargs.get('base_url') or self.base_url]
        parts.extend(args)
        parts = [str(p) for p in parts]
        key = tuple(parts)
        __logs__.info('Building a url from %s', key)
        if not key in __url_cache__:
            __logs__.info('Missed the cache building the url')
            __url_cache__[key] = '/'.join(parts)
        return __url_cache__[key]
389359
def write_url_external_net(row1, col1, row2, col2, url, str, format)       #:nodoc:
    record      = 0x01B8                       # Record identifier
    length      = 0x00000                      # Bytes to follow

    xf          = format || url_format  # The cell format

    # Strip URL type and change Unix dir separator to Dos style (if needed)
    #
    url = url.sub(/^external:/, '').gsub!(%r|/|, '\\')

    # Write the visible label but protect against url recursion in write().
    str = url.sub(/\#/, ' - ') unless str
    error        = write_string(row1, col1, str, xf)
    return error if error == -2

    dir_long, link_type, sheet_len, sheet = analyze_link(url)

    # Pack the link type
    link_type      = [link_type].pack("V")

    # Make the string null terminated
    dir_long      += "\0"

    # Pack the lengths of the dir string
    dir_long_len  = [dir_long.bytesize].pack("V")

    # Store the long dir name as a wchar string (non-null terminated)
    dir_long = dir_long.split('').join("\0") + "\0"

    # Pack the undocumented part of the hyperlink stream
    unknown1    = ['D0C9EA79F9BACE118C8200AA004BA90B02000000'].pack("H*")

    # Pack the main data stream
    data         = [row1, row2, col1, col2].pack("vvvv") +
    unknown1     +
    link_type    +
    dir_long_len +
    dir_long     +
    sheet_len    +
    sheet

    # Pack the header data
    length      = data.bytesize
    header      = [record, length].pack("vv")

    # Write the packed data
    append(header, data)

    error
  end
707182
def get(url):
    """"""
    writeln("Getting data from url", url)
    response = requests.get(url)
    if response.status_code == 200:
        writeln(response.text)
    else:
        writeln(str(response.status_code), response.reason)
566254
def url_read(url, verbose=True):
    
    """
    if url.find('://') == -1:
        url = 'http://' + url
    if verbose:
        print('Reading data from url=%r' % (url,))
    try:
        file_ = _urllib.request.urlopen(url)
        #file_ = _urllib.urlopen(url)
    except IOError:
        raise
    data = file_.read()
    file_.close()
    return data
519107
def write_data(self, data):
        
        with open(self.path, "w") as writer:
            writer.write(data)
770949
def add_url(self):
        """"""
        if self.url:
            self.url_data.add_url(self.url, line=self.parser.CurrentLineNumber,
                column=self.parser.CurrentColumnNumber)
            self.url = u""
1098921
def write(file_name, data):
    """"""
    with open(file_name, 'w') as f:
        f.write(encode(data))
121830
def add_url(self, url, description=None):
        
        url = {
            'value': url,
        }
        if description:
            url['description'] = description
        self._append_to('urls', url)
1178705
def write_size (self, url_data):
        """"""
        self.writeln(u"<tr><td>"+self.part("dlsize")+u"</td><td>"+
                     strformat.strsize(url_data.size)+
                     u"</td></tr>")
788997
def write_modified(self, url_data):
        """"""
        self.write(self.part("modified") + self.spaces("modified"))
        self.writeln(self.format_modified(url_data.modified))
345521
def write_warning (self, url_data):
        """"""
        sep = u"<br/>"+os.linesep
        text = sep.join(cgi.escape(x[1]) for x in url_data.warnings)
        self.writeln(u'<tr><td class="warning" '+
                     u'valign="top">' + self.part("warning") +
                     u'</td><td class="warning">' + text + u"</td></tr>")
1326996
def write(self, data):
        """"""
        while True:
            try:
                return self._sslobj.write(data)
            except SSLError:
                ex = sys.exc_info()[1]
                if ex.args[0] == SSL_ERROR_WANT_READ:
                    if self.timeout == 0.0:
                        raise
                    six.exc_clear()
                    self._io.wait_read(timeout=self.timeout, timeout_exc=_SSLErrorWriteTimeout)
                elif ex.args[0] == SSL_ERROR_WANT_WRITE:
                    if self.timeout == 0.0:
                        raise
                    six.exc_clear()
                    self._io.wait_write(timeout=self.timeout, timeout_exc=_SSLErrorWriteTimeout)
                else:
                    raise
1121847
def log_url (self, url_data):
        """"""
        self.writeln()
        if self.has_part('url'):
            self.write_url(url_data)
        if url_data.name and self.has_part('name'):
            self.write_name(url_data)
        if url_data.parent_url and self.has_part('parenturl'):
            self.write_parent(url_data)
        if url_data.base_ref and self.has_part('base'):
            self.write_base(url_data)
        if url_data.url and self.has_part('realurl'):
            self.write_real(url_data)
        if url_data.checktime and self.has_part('checktime'):
            self.write_checktime(url_data)
        if url_data.dltime >= 0 and self.has_part('dltime'):
            self.write_dltime(url_data)
        if url_data.size >= 0 and self.has_part('dlsize'):
            self.write_size(url_data)
        if url_data.info and self.has_part('info'):
            self.write_info(url_data)
        if url_data.modified and self.has_part('modified'):
            self.write_modified(url_data)
        if url_data.warnings and self.has_part('warning'):
            self.write_warning(url_data)
        if self.has_part('result'):
            self.write_result(url_data)
        self.flush()
94234
def log_url (self, url_data):
        
        self.xml_starttag(u'urldata')
        if self.has_part('url'):
            self.xml_tag(u"url", unicode(url_data.base_url))
        if url_data.name and self.has_part('name'):
            self.xml_tag(u"name", unicode(url_data.name))
        if url_data.parent_url and self.has_part('parenturl'):
            attrs = {
                u'line': u"%d" % url_data.line,
                u'column': u"%d" % url_data.column,
            }
            self.xml_tag(u"parent", unicode(url_data.parent_url),
                         attrs=attrs)
        if url_data.base_ref and self.has_part('base'):
            self.xml_tag(u"baseref", unicode(url_data.base_ref))
        if self.has_part("realurl"):
            self.xml_tag(u"realurl", unicode(url_data.url))
        if self.has_part("extern"):
            self.xml_tag(u"extern", u"%d" % (1 if url_data.extern else 0))
        if url_data.dltime >= 0 and self.has_part("dltime"):
            self.xml_tag(u"dltime", u"%f" % url_data.dltime)
        if url_data.size >= 0 and self.has_part("dlsize"):
            self.xml_tag(u"dlsize", u"%d" % url_data.size)
        if url_data.checktime and self.has_part("checktime"):
            self.xml_tag(u"checktime", u"%f" % url_data.checktime)
        if self.has_part("level"):
            self.xml_tag(u"level", u"%d" % url_data.level)
        if url_data.info and self.has_part('info'):
            self.xml_starttag(u"infos")
            for info in url_data.info:
                self.xml_tag(u"info", info)
            self.xml_endtag(u"infos")
        if url_data.modified and self.has_part('modified'):
            self.xml_tag(u"modified", self.format_modified(url_data.modified))
        if url_data.warnings and self.has_part('warning'):
            self.xml_starttag(u"warnings")
            for tag, data in url_data.warnings:
                attrs = {}
                if tag:
                    attrs["tag"] = tag
                self.xml_tag(u"warning", data, attrs)
            self.xml_endtag(u"warnings")
        if self.has_part("result"):
            attrs = {}
            if url_data.result:
                attrs["result"] = url_data.result
            self.xml_tag(u"valid", u"%d" % (1 if url_data.valid else 0), attrs)
        self.xml_endtag(u'urldata')
        self.flush()
457576
def write(url, content, **args):
    """"""
    with FTPSResource(url, **args) as resource:
        resource.write(content)