mirror of https://github.com/scrapy/scrapy.git
removed code from scrapy.link to avoid cyclic imports from scrapy.contrib.linkextractors.sgml
This commit is contained in:
parent
86498abdf1
commit
59e504a003
|
|
@ -22,25 +22,3 @@ class Link(object):
|
|||
def __repr__(self):
|
||||
return '<Link url=%r text=%r >' % (self.url, self.text)
|
||||
|
||||
|
||||
# FIXME: code below is for backwards compatibility and should be removed before
|
||||
# the 0.7 release
|
||||
|
||||
import warnings
|
||||
|
||||
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor, BaseSgmlLinkExtractor
|
||||
|
||||
class LinkExtractor(BaseSgmlLinkExtractor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn("scrapy.link.LinkExtractor is deprecated, use scrapy.contrib.linkextractors.sgml.BaseSgmlLinkExtractor instead",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
BaseSgmlLinkExtractor.__init__(self, *args, **kwargs)
|
||||
|
||||
class RegexLinkExtractor(SgmlLinkExtractor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn("scrapy.link.RegexLinkExtractor is deprecated, use scrapy.contrib.linkextractors.sgml.SgmlLinkExtractor instead",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
SgmlLinkExtractor.__init__(self, *args, **kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue