Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

scrapy/contrib/linkextractors shims

Julia Medina569156be190f
diff --git a/scrapy/contrib/linkextractors/__init__.py b/scrapy/contrib/linkextractors/__init__.py
new file mode 100644
index 000000000..976658df3
--- /dev/null
+++ b/scrapy/contrib/linkextractors/__init__.py
@@ -0,0 +1,7 @@
+import warnings
+from scrapy.exceptions import ScrapyDeprecationWarning
+warnings.warn("Module `scrapy.contrib.linkextractors` is deprecated, "
+ "use `scrapy.linkextractors` instead",
+ ScrapyDeprecationWarning, stacklevel=2)
+
+from scrapy.linkextractors import *
diff --git a/scrapy/contrib/linkextractors/htmlparser.py b/scrapy/contrib/linkextractors/htmlparser.py
new file mode 100644
index 000000000..ff03da98f
--- /dev/null
+++ b/scrapy/contrib/linkextractors/htmlparser.py
@@ -0,0 +1,7 @@
+import warnings
+from scrapy.exceptions import ScrapyDeprecationWarning
+warnings.warn("Module `scrapy.contrib.linkextractors.htmlparser` is deprecated, "
+ "use `scrapy.linkextractors.htmlparser` instead",
+ ScrapyDeprecationWarning, stacklevel=2)
+
+from scrapy.linkextractors.htmlparser import *
diff --git a/scrapy/contrib/linkextractors/lxmlhtml.py b/scrapy/contrib/linkextractors/lxmlhtml.py
new file mode 100644
index 000000000..fc2b7de3c
--- /dev/null
+++ b/scrapy/contrib/linkextractors/lxmlhtml.py
@@ -0,0 +1,7 @@
+import warnings
+from scrapy.exceptions import ScrapyDeprecationWarning
+warnings.warn("Module `scrapy.contrib.linkextractors.lxmlhtml` is deprecated, "
+ "use `scrapy.linkextractors.lxmlhtml` instead",
+ ScrapyDeprecationWarning, stacklevel=2)
+
+from scrapy.linkextractors.lxmlhtml import *
diff --git a/scrapy/contrib/linkextractors/regex.py b/scrapy/contrib/linkextractors/regex.py
new file mode 100644
index 000000000..97bda29c1
--- /dev/null
+++ b/scrapy/contrib/linkextractors/regex.py
@@ -0,0 +1,7 @@
+import warnings
+from scrapy.exceptions import ScrapyDeprecationWarning
+warnings.warn("Module `scrapy.contrib.linkextractors.regex` is deprecated, "
+ "use `scrapy.linkextractors.regex` instead",
+ ScrapyDeprecationWarning, stacklevel=2)
+
+from scrapy.linkextractors.regex import *
diff --git a/scrapy/contrib/linkextractors/sgml.py b/scrapy/contrib/linkextractors/sgml.py
new file mode 100644
index 000000000..a5a598208
--- /dev/null
+++ b/scrapy/contrib/linkextractors/sgml.py
@@ -0,0 +1,7 @@
+import warnings
+from scrapy.exceptions import ScrapyDeprecationWarning
+warnings.warn("Module `scrapy.contrib.linkextractors.sgml` is deprecated, "
+ "use `scrapy.linkextractors.sgml` instead",
+ ScrapyDeprecationWarning, stacklevel=2)
+
+from scrapy.linkextractors.sgml import *