mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-23 15:23:40 +00:00
Move scrapy/linkextractor.py to scrapy/linkextractors/__init__.py
This commit is contained in:
parent
896b6dd481
commit
d72536688f
@ -78,8 +78,8 @@ LxmlLinkExtractor
|
||||
:param deny_extensions: a single value or list of strings containing
|
||||
extensions that should be ignored when extracting links.
|
||||
If not given, it will default to the
|
||||
``IGNORED_EXTENSIONS`` list defined in the `scrapy.linkextractor`_
|
||||
module.
|
||||
``IGNORED_EXTENSIONS`` list defined in the
|
||||
`scrapy.linkextractors`_ module.
|
||||
:type deny_extensions: list
|
||||
|
||||
:param restrict_xpaths: is an XPath (or list of XPath's) which defines
|
||||
@ -132,4 +132,4 @@ LxmlLinkExtractor
|
||||
|
||||
:type process_value: callable
|
||||
|
||||
.. _scrapy.linkextractor: https://github.com/scrapy/scrapy/blob/master/scrapy/linkextractor.py
|
||||
.. _scrapy.linkextractors: https://github.com/scrapy/scrapy/blob/master/scrapy/linkextractors/__init__.py
|
||||
|
@ -1,6 +1,9 @@
|
||||
"""
|
||||
Common code and definitions used by Link extractors (located in
|
||||
scrapy.linkextractors).
|
||||
scrapy.linkextractors
|
||||
|
||||
This package contains a collection of Link Extractors.
|
||||
|
||||
For more info see docs/topics/link-extractors.rst
|
||||
"""
|
||||
import re
|
||||
from six.moves.urllib.parse import urlparse
|
||||
@ -98,3 +101,6 @@ class FilteringLinkExtractor(object):
|
||||
|
||||
def _extract_links(self, *args, **kwargs):
|
||||
return self.link_extractor._extract_links(*args, **kwargs)
|
||||
|
||||
# Top-level imports
|
||||
from .lxmlhtml import LxmlLinkExtractor as LinkExtractor
|
@ -11,7 +11,7 @@ from scrapy.selector import Selector
|
||||
from scrapy.link import Link
|
||||
from scrapy.utils.misc import arg_to_iter
|
||||
from scrapy.utils.python import unique as unique_list, str_to_unicode
|
||||
from scrapy.linkextractor import FilteringLinkExtractor
|
||||
from scrapy.linkextractors import FilteringLinkExtractor
|
||||
from scrapy.utils.response import get_base_url
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ from sgmllib import SGMLParser
|
||||
from w3lib.url import safe_url_string
|
||||
from scrapy.selector import Selector
|
||||
from scrapy.link import Link
|
||||
from scrapy.linkextractor import FilteringLinkExtractor
|
||||
from scrapy.linkextractors import FilteringLinkExtractor
|
||||
from scrapy.utils.misc import arg_to_iter
|
||||
from scrapy.utils.python import unique as unique_list, str_to_unicode
|
||||
from scrapy.utils.response import get_base_url
|
||||
|
Loading…
x
Reference in New Issue
Block a user