Given an entry URL, return the entry

    Arguments:

    config -- the configuration
    url -- the URL of the entry

    Returns: 3-tuple of (current, previous, updated)
421093
async def get_entry(config, url):
    

    previous = config.cache.get(
        'entry', url,
        schema_version=SCHEMA_VERSION) if config.cache else None

    headers = previous.caching if previous else None

    request = await utils.retry_get(config, url, headers=headers)
    if not request or not request.success:
        LOGGER.error("Could not get entry %s: %d", url,
                     request.status if request else -1)
        return None, previous, False

    # cache hit
    if request.cached:
        return previous, previous, False

    current = Entry(request)

    # Content updated
    if config.cache:
        config.cache.set('entry', url, current)

    return current, previous, (not previous
                               or previous.digest != current.digest
                               or previous.status != current.status)
173269
def get_login_url(self):
        """"""
        params = {'service': self.service_url}
        if self.renew:
            params.update({'renew': 'true'})

        params.update(self.extra_login_params)
        url = urllib_parse.urljoin(self.server_url, 'login')
        query = urllib_parse.urlencode(params)
        return url + '?' + query
1054575
def _config_from_url(self):
        
        config = {
            "name": self._blk.name,
            "options": {}
        }
        for key, value in six.iteritems(request.args):
            if isinstance(value, list) and len(value) == 1:
                config["options"][key] = value[0]
            else:
                config["options"][key] = value
        return config
269419
def _get_config(self):
    ''''''
    filename = '{}/{}'.format(self.PLUGIN_LOGDIR, CONFIG_FILENAME)
    modified_time = os.path.getmtime(filename)

    if modified_time != self.config_last_modified_time:
      config = read_pickle(filename, default=self.previous_config)
      self.previous_config = config
    else:
      config = self.previous_config

    self.config_last_modified_time = modified_time
    return config
541909
def getConf(self):
        
        conf = {
            "articleInfo": self.articleInfo._getFlags().copy(),
            "eventInfo": self.eventInfo._getFlags().copy(),
            "sourceInfo": self.sourceInfo._getFlags().copy(),
            "categoryInfo":  self.categoryInfo._getFlags().copy(),
            "conceptInfo": self.conceptInfo._getFlags().copy(),
            "locationInfo": self.locationInfo._getFlags().copy(),
            "storyInfo": self.storyInfo._getFlags().copy(),
            "conceptClassInfo": self.articleInfo._getFlags().copy(),
            "conceptFolderInfo": self.articleInfo._getFlags().copy()
        }
        conf["articleInfo"].update(self.articleInfo._getVals())
        conf["eventInfo"].update(self.eventInfo._getVals())
        conf["sourceInfo"].update(self.sourceInfo._getVals())
        conf["categoryInfo"].update(self.categoryInfo._getVals())
        conf["conceptInfo"].update(self.conceptInfo._getVals())
        conf["locationInfo"].update(self.locationInfo._getVals())
        conf["storyInfo"].update(self.storyInfo._getVals())
        conf["conceptClassInfo"].update(self.conceptClassInfo._getVals())
        conf["conceptFolderInfo"].update(self.conceptFolderInfo._getVals())
        return conf
752978
def ping_entry(self, entry):
        
        entry_url = '%s%s' % (self.ressources.site_url,
                              entry.get_absolute_url())
        categories = '|'.join([c.title for c in entry.categories.all()])

        try:
            reply = self.server.weblogUpdates.extendedPing(
                self.ressources.current_site.name,
                self.ressources.blog_url, entry_url,
                self.ressources.blog_feed, categories)
        except Exception:
            try:
                reply = self.server.weblogUpdates.ping(
                    self.ressources.current_site.name,
                    self.ressources.blog_url, entry_url,
                    categories)
            except Exception:
                reply = {'message': '%s is an invalid directory.' %
                         self.server_name,
                         'flerror': True}
        return reply
241849
def uri_to_kwargs(uri):
    
    parsed = urlparse(uri)
    default_user = get_current_user()
    password = unquote(parsed.password) if parsed.password else None
    kwargs = {'host': parsed.hostname,
              'port': parsed.port,
              'dbname': parsed.path[1:] or default_user,
              'user': parsed.username or default_user,
              'password': password}
    values = parse_qs(parsed.query)
    if 'host' in values:
        kwargs['host'] = values['host'][0]
    for k in [k for k in values if k in KEYWORDS]:
        kwargs[k] = values[k][0] if len(values[k]) == 1 else values[k]
        try:
            if kwargs[k].isdigit():
                kwargs[k] = int(kwargs[k])
        except AttributeError:
            pass
    return kwargs
162724
def get_config(url_prefix)
      request = Net::HTTP::Get.new("#{@jenkins_path}#{url_prefix}/config.xml")
      @logger.debug "GET #{url_prefix}/config.xml"
      response = make_http_request(request)
      handle_exception(response, "body")
    end
297295
public static URL url(AbstractConfig config, String key) {
    final String value = config.getString(key);
    return url(key, value);
  }
777835
function urlConfig (url) {
        var config = {
            path: true,
            query: true,
            hash: true
        };

        if (!url) {
            return config;
        }

        if (RX_PROTOCOL.test(url)) {
            config.protocol = true;
            config.host = true;

            if (RX_PORT.test(url)) {
                config.port = true;
            }

            if (RX_CREDS.test(url)) {
                config.user = true;
                config.pass = true;
            }
        }

        return config;
    }
837723
def get_current_url():
    
    if current_app.config.get('SERVER_NAME') and (
            # Check current hostname against server name, ignoring port numbers, if any (split on ':')
            request.environ['HTTP_HOST'].split(':', 1)[0] != current_app.config['SERVER_NAME'].split(':', 1)[0]):
        return request.url

    url = url_for(request.endpoint, **request.view_args)
    query = request.query_string
    if query:
        return url + '?' + query.decode()
    else:
        return url
111220
def get_uris(config):
    
    file_names = []
    if config.INPUT_DATA is None:
        sys.stderr.write("you need to provide INPUT_DATA in config\n")
        sys.exit(1)
    if isinstance(config.INPUT_DATA, basestring):
        config.INPUT_DATA = [config.INPUT_DATA]
    file_size = 0
    for uri in config.INPUT_DATA:
        for regex, uri_method, _, _ in URI_REGEXES:
            m = regex.match(uri)
            if m is not None:
                file_size += uri_method(m, file_names, config)
                break
    print("going to process {} files...".format(len(file_names)))
    return file_size, file_names
124009
def get_config(self, key, default=None):
        
        depr(0, 13, "Route.get_config() is deprectated.",
                    "The Route.config property already includes values from the"
                    " application config for missing keys. Access it directly.")
        return self.config.get(key, default)
59281
def get_redirect_url(self, **kwargs):
        
        entry = get_object_or_404(Entry.published, pk=int(kwargs['token'], 36))
        return entry.get_absolute_url()
987499
def return_current_uri(self):
        
        uri = post_slash("%s" % self.current_dir())
        for uri_part in self.slots.keys():
            if self.slots[uri_part] != None:
                uri += "%s/" % self.slots[uri_part]
        return uri
837800
function processEntry(entry, siteConfig) {
    const returnArr = [siteConfig.spacing + '<url>'];

    const loc = entry.getLoc ? entry.getLoc(siteConfig.siteUrl, entry.loc, entry) : entry.loc;
    returnArr.push(siteConfig.spacing + siteConfig.spacing + wrapTag('loc', loc));

    let lastmod = entry.lastmod;
    if (lastmod) {
        //format mtime to ISO (same as +00:00)
        lastmod = new Date(lastmod).toISOString();
        returnArr.push(siteConfig.spacing + siteConfig.spacing + wrapTag('lastmod', lastmod));
    }

    const changefreq = entry.changefreq;
    if (changefreq) {
        returnArr.push(siteConfig.spacing + siteConfig.spacing + wrapTag('changefreq', changefreq));
    }

    let priority;

    if (typeof entry.priority === 'function') {
        priority = entry.priority(siteConfig.siteUrl, entry.loc, entry);
    } else if (typeof entry.priority !== 'undefined') {
        priority = entry.priority;
    }
    if (typeof priority !== 'undefined') {
        returnArr.push(siteConfig.spacing + siteConfig.spacing + wrapTag('priority', priority));
    }

    const hreflang = entry.hreflang;
    if (hreflang && hreflang.length > 0) {
        const file = entry.file;
        hreflang.forEach(function(item) {
            const href = item.getHref(siteConfig.siteUrl, file, item.lang, loc);
            const tag = '<xhtml:link rel="alternate" hreflang="' + item.lang + '" href="' + href + '" />';
            returnArr.push(siteConfig.spacing + siteConfig.spacing + tag);
        });
    }

    returnArr.push(siteConfig.spacing + '</url>');
    return returnArr.join(siteConfig.newLine);
}
37353
def get_config_var_entry(self, index):
        """"""

        if index == 0 or index > len(self.config_database.entries):
            return [Error.INVALID_ARRAY_KEY, 0, 0, 0, b'\0'*8, 0, 0]

        entry = self.config_database.entries[index - 1]
        if not entry.valid:
            return [ConfigDatabaseError.OBSOLETE_ENTRY, 0, 0, 0, b'\0'*8, 0, 0]

        offset = sum(x.data_space() for x in self.config_database.entries[:index - 1])
        return [Error.NO_ERROR, self.config_database.ENTRY_MAGIC, offset, entry.data_space(), entry.target.encode(), 0xFF, 0]