Add additional URLs such as robots.txt, favicon.ico.
352255
def add_extra_urls(self, item_session: ItemSession):
        ''''''

        if item_session.url_record.level == 0 and self._sitemaps:
            extra_url_infos = (
                self.parse_url(
                    '{0}://{1}/robots.txt'.format(
                        item_session.url_record.url_info.scheme,
                        item_session.url_record.url_info.hostname_with_port)
                ),
                self.parse_url(
                    '{0}://{1}/sitemap.xml'.format(
                        item_session.url_record.url_info.scheme,
                        item_session.url_record.url_info.hostname_with_port)
                )
            )

            for url_info in extra_url_infos:
                item_session.add_child_url(url_info.url)
1163472
def build_url (self):
        """"""
        super(UnknownUrl, self).build_url()
        if self.is_ignored():
            self.add_info(_("%(scheme)s URL ignored.") %
                          {"scheme": self.scheme.capitalize()})
            self.set_result(_("ignored"))
        else:
            self.set_result(_("URL is unrecognized or has invalid syntax"),
                        valid=False)
103169
def add_meta(self, obj, tags, prompt, verbosity, old_url=None):
        
        for tag in tags:
            keyword = self.trunc(Keyword, prompt, title=tag)
            keyword, created = Keyword.objects.get_or_create_iexact(**keyword)
            obj.keywords.create(keyword=keyword)
            if created and verbosity >= 1:
                print("Imported tag: %s" % keyword)
        if old_url is not None:
            old_path = urlparse(old_url).path
            if not old_path.strip("/"):
                return
            redirect = self.trunc(Redirect, prompt, old_path=old_path)
            redirect['site'] = Site.objects.get_current()
            redirect, created = Redirect.objects.get_or_create(**redirect)
            redirect.new_path = obj.get_absolute_url()
            redirect.save()
            if created and verbosity >= 1:
                print("Created redirect for: %s" % old_url)
766033
def default_links_factory_with_additional(additional_links):
    
    def factory(pid, **kwargs):
        links = default_links_factory(pid)
        for link in additional_links:
            links[link] = additional_links[link].format(pid=pid,
                                                        scheme=request.scheme,
                                                        host=request.host)
        return links

    return factory
194861
def add(self, domain_accession, domain_type, match_quality):
        ''''''
        self.matches[domain_type] = self.matches.get(domain_type, {})
        self.matches[domain_type][domain_accession] = match_quality
268001
def add_page(url)
      unless robot_txt_allowed?(url)
        @scanned_pages << url
        return nil
      end
      page = Page.new(url)
      @pages << page
      @scanned_pages << url
    end
1192920
def add_wikipage(self, slug, content, **attrs):
        
        return WikiPages(self.requester).create(
            self.id, slug, content, **attrs
        )
244703
def add(self, urls):
        

        if isinstance(urls, (list, tuple)):
            self.urls.extend(urls)
        elif isinstance(urls, basestring):
            self.urls.append(urls)
        elif isinstance(urls, QuerySet):
            for obj in urls:
                self.urls.append(obj.get_absolute_url())
        elif hasattr(urls, 'get_absolute_url'):
            self.urls.append(urls.get_absolute_url())
        else:
            raise TypeError("Don't know how to handle %r" % urls)
729998
public function addWpEnv()
    {
        $wpp = $this->wpProvider;
        $data = [
            'site-url' => $wpp->getBlogInfo('url'),
            'site-wpurl' => $wpp->getBlogInfo('wpurl'),
            'site-description' => $wpp->getBlogInfo('description'),
            'site-rss_url' => $wpp->getBlogInfo('rss_url'),
            'site-rss2_url' => $wpp->getBlogInfo('rss2_url'),
            'site-atom_url' => $wpp->getBlogInfo('atom_url'),
            'site-comments_atom_url' => $wpp->getBlogInfo('comments_atom_url'),
            'site-comments_rss2_url' => $wpp->getBlogInfo('comments_rss2_url'),
            'site-pingback_url' => $wpp->getBlogInfo('pingback_url'),
            'site-stylesheet_url' => $wpp->getBlogInfo('stylesheet_url'),
            'site-stylesheet_directory' => $wpp->getBlogInfo('stylesheet_directory'),
            'site-template_directory' => $wpp->getBlogInfo('template_directory'),
            'site-admin_email' => $wpp->getBlogInfo('admin_email'),
            'site-charset' => $wpp->getBlogInfo('charset'),
            'site-html_type' => $wpp->getBlogInfo('html_type'),
            'site-version' => $wpp->getBlogInfo('version'),
            'site-language' => $wpp->getBlogInfo('language'),
            'site-name' => $wpp->getBlogInfo('name'),
        ];

        $this->mergeToTheData($data);
        return $this;
    }
927190
def extend_src(self, content, context):
        """"""

        self.extend_src_text(content, context, self.block_comments, 'block-comment')
        self.extend_src_text(content, context, self.line_comments, 'line-comment')
642877
def link_empty_favicon_fallback(self):
        """"""
        self.favicon_fallback = os.path.join(
            os.path.dirname(__file__), 'favicon.ico')
164520
def add_find_links(self, urls):
        """"""
        for url in urls:
            if (
                self.to_scan is None  # if we have already "gone online"
                or not URL_SCHEME(url)  # or it's a local file/directory
                or url.startswith('file:')
                or list(distros_for_url(url))  # or a direct package link
            ):
                # then go ahead and process it now
                self.scan_url(url)
            else:
                # otherwise, defer retrieval till later
                self.to_scan.append(url)
679810
def add_link(self, **kwgs):
        
        self.links.append(kwgs)
        if kwgs.get('type') == 'text/javascript':
            if 'scripted' not in self.properties:
                self.properties.append('scripted')
2210
def _make_url(major, minor, micro, releaselevel, serial):
    """"""
    url = "https://django-pagination-bootstrap.readthedocs.io"
    if releaselevel != 'final':
        # For pre-releases, use a version-specific URL.
        url += "/en/" + _make_version(major, minor, micro, releaselevel, serial)
    return url
127645
def add_options(self):
        
        self.add_bool_option("--reveal",
            help="show full announce URL including keys")
        self.add_bool_option("--raw",
            help="print the metafile's raw content in all detail")
        self.add_bool_option("-V", "--skip-validation",
            help="show broken metafiles with an invalid structure")
        self.add_value_option("-o", "--output", "KEY,KEY1.KEY2,...",
            action="append", default=[],
            help="select fields to print, output is separated by TABs;"
                 " note that __file__ is the path to the metafile,"
                 " __hash__ is the info hash,"
                 " and __size__ is the data size in bytes"
         )
819319
def _add(self, lines):
        '''

        '''
        lines = self._setup('ADD', lines)

        for line in lines:
            values = line.split(" ")
            frompath = values.pop(0)

            # Custom parsing for frompath

            # If it's a web address, add to install routine to get
            if frompath.startswith('http'):
                for topath in values:
                    self._parse_http(frompath, topath)

            # Add the file, and decompress in install
            elif re.search("[.](gz|gzip|bz2|xz)$", frompath.strip()):
                for topath in values:
                    self._parse_archive(frompath, topath)

            # Just add the files
            else:
                for topath in values:
                    self._add_files(frompath, topath)
542015
def _build_url(self):
        """"""
        self.connection["upload_url"] = (
            "%s/%s" % (self.connection["jss"].base_url, "dbfileupload"))
        self.connection["delete_url"] = (
            "%s/%s" % (self.connection["jss"].base_url,
                       "casperAdminSave.jxml"))