Deletes one or more links from the website. Returns the deleted links.
 Expects the links provided in an array
513870
def remove_links(urls)
      urls.map { |url| list_links({ url: url }) }.flatten.compact.each do |link|
        website.remove_link(link)
      end
    end
827765
def links(self):
        
        links = super(OffsetLimitPaginatedList, self).links
        if self._page.offset + self._page.limit < self.count:
            links["next"] = Link.for_(
                self._operation,
                self._ns,
                qs=self._page.next_page.to_items(),
                **self._context
            )
        if self.offset > 0:
            links["prev"] = Link.for_(
                self._operation,
                self._ns,
                qs=self._page.prev_page.to_items(),
                **self._context
            )
        return links
11600
def unlink(self, *others):
        
        if not len(others):
            others = self.links[:]
        for p in self.links[:]:
            if p in others:
                p.teardown()
        return self
981796
protected function removeInvalidOrHiddenLinks(array $links): array
    {
        foreach ($links as $i => &$link) {
            if (!isset($link['target_page_id']) && !isset($link['url'])) {
                unset($links[$i]);

                continue;
            }

            $target = empty($link['target_page_id']) ? $link['url'] : $link['target_page_id'];

            $link = Link::factory($target, $link);

            if (!$link->isValid() || (!$this->editable && !$link->isVisible())) {
                unset($links[$i]);
            }
        }

        return array_values($links);
    }
1126541
def links
      return @links unless @links.nil?
      @links = []
      return @links if !doc

      doc.search("//a[@href]").each do |a|
        u = a['href']
        next if u.nil? or u.empty?
        abs = to_absolute(u) rescue next
        @links << abs if in_domain?(abs)
      end
      @links.uniq!
      @links
    end
107001
def delete_many(self, uris):
        
        deleted_nodes = {}

        for uri in uris:
            node = self.delete(uri)
            if node:
                deleted_nodes[uri] = node

        return deleted_nodes
1182676
def evict(self, urls):
        
        if isinstance(urls, six.text_type):
            urls = [urls]
        urls = set(normalize_url(url) for url in urls)
        retval = 0
        for key in list(self.cache):
            if key[0] in urls:
                retval += 1
                del self.cache[key]
                del self.timeouts[key]
        return retval
1077440
def _scrub_links(links, name):
    '''
    
    '''
    if isinstance(links, list):
        ret = []
        for l in links:
            ret.append(l.replace('/{0}/'.format(name), '/', 1))
    else:
        ret = links

    return ret
1307553
public function actionDeleteUnused()
    {
        $articeThumb = [];
        $rootPath = yii::getAlias('@frontend/web');
        foreach (Article::find()->where(['<>', 'thumb', ''])->each(100) as $artice) {
            $articeThumb[] = str_replace(yii::$app->params['site']['url'], $rootPath, $artice->thumb);
        }

        $articleContent = [];
        foreach (ArticleContent::find()->where(['<>', 'content', ''])->each(100) as $content) {
            $content->content = str_replace(yii::$app->params['site']['url'], yii::$app->params['site']['sign'], $content->content);
            preg_match_all('/<img.*src="(' . yii::$app->params['site']['sign'] . '.*)"/isU', $content->content, $matches);
            if (! empty($matches[1])) {
                foreach ($matches[1] as $pic) {
                    $articleContent[] = str_replace(yii::$app->params['site']['sign'], $rootPath, $pic);
                }
            }
        }

        $friendlink = [];
        foreach (FriendlyLink::find()->where(['<>', 'image', ''])->each(100) as $link) {
            $friendlink[] = $rootPath . $link->image;
        }

        $this->unusedFiles = array_merge($articeThumb, $articleContent, $friendlink);

        $this->_deleteFileRecursive(yii::getAlias('@uploads'));

    }
665054
def delete(rdf_url)
      begin
        graph = fetch_cached_graph(rdf_url)
        puts "[INFO] did not delete #{rdf_url}, it doesn't exist in the triplestore cache" if graph.nil?
        return true if graph.nil?

        statements = graph.each_statement.to_a
        @client.delete(statements)
        return true
      rescue => e
        raise TriplestoreAdapter::TriplestoreException, "delete #{rdf_url} from triplestore cache failed with exception: #{e.message}"
      end
    end
433072
def _delete_request(self, url, headers, data=None):
        
        return self._session.delete(url, headers=headers, data=data)
168123
def links(self):
        
        def clean(url):
            "Tidy up an URL."
            scheme, netloc, path, params, query, frag = urlparse(url)
            return urlunparse((scheme, netloc, quote(path),
                               params, query, frag))

        result = set()
        for match in self._href.finditer(self.data):
            d = match.groupdict('')
            rel = (d['rel1'] or d['rel2'] or d['rel3'] or
                   d['rel4'] or d['rel5'] or d['rel6'])
            url = d['url1'] or d['url2'] or d['url3']
            url = urljoin(self.base_url, url)
            url = unescape(url)
            url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url)
            result.add((url, rel))
        # We sort the result, hoping to bring the most recent versions
        # to the front
        result = sorted(result, key=lambda t: t[0], reverse=True)
        return result
296648
def delete(url)
      params = { url: url }
      options = create_params(params)
      result_code = self.class.get('/posts/delete', options).parsed_response["result"]["code"]

      raise Error.new(result_code) if result_code != "done"

      result_code
    end
1000513
public void remove() {

    if (context == null) {
      throw new IllegalStateException("link with href=" + getHref() + " can not be removed, because it's not part of a HAL resource tree");
    }

    // iterate over all links grouped by relation (because for removal we need to know the relation)
    ListMultimap<String, Link> allLinks = context.getLinks();
    for (String relation : allLinks.keySet()) {
      List<Link> links = allLinks.get(relation);

      // use an indexed for-loop, because we need to know the index to properly remove the link
      for (int i = 0; i < links.size(); i++) {
        if (links.get(i).getModel() == model) {
          context.removeLink(relation, i);
          context = null;
          return;
        }
      }
    }

    throw new IllegalStateException("the last known context resource of link with href=" + getHref() + " no longer contains this link");
  }
407837
def delete(self, url):
        
        try:
            res = requests.delete(url, headers=self.headers)
            return json.loads(res.text)
        except Exception as e:
            print(e)
            return "error"
1123131
def delete(self):
        

        if not self.id:
            return
        if not self._loaded:
            self.reload()
        return self.http_delete(self.id, etag=self.etag)
478801
def delete_link(obj, options = {})
      if policy(obj).destroy?
        default_options = { data: {
          confirm: 'Are you sure? There is no undo for this!',
          tooltip: 'Delete',
          method: 'Delete',
          remote: 'true'
        } }
        url = polymorphic_url(obj)
        action_link('Delete', url, 'trash-o', default_options.deep_merge(options))
      end
    end