Skip to content

Commit

Permalink
update import
Browse files Browse the repository at this point in the history
  • Loading branch information
jadbin committed Jul 14, 2018
1 parent e268127 commit ec069f7
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 23 deletions.
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Spider Example

.. code-block:: python
from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider
class TencentNewsSpider(Spider):
Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Refactoring
- 调整了中间件加载顺序权值
- HttpRequest对 ``auth`` 、 ``cookie_jar`` 、 ``proxy`` 、 ``proxy_auth`` 的配置移至 ``meta`` 属性中。
- SetDupeFilter更名为HashDupeFilter
- 修改aiohttp的版本限制为>=3.3.2

0.9.1 (2018-04-16)
------------------
Expand Down Expand Up @@ -178,7 +179,7 @@ Refactoring
Bug fixes
~~~~~~~~~

- HttpResponse中的 ``url`` 字段源于aiohttp返回的ClientResponse中的 ``url`` 字段,实际应为 ``URL`` 对象
- HttpResponse中的 ``url`` 字段源于aiohttp返回的ClientResponse中的 ``url`` 字段,实际应为 ``yarl.URL`` 对象

Refactoring
~~~~~~~~~~~
Expand Down
3 changes: 1 addition & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ Spider Example

.. code-block:: python
from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider
class TencentNewsSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions docs/spider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ Cron Job

.. code-block:: python
from xpaw import Spider, HttpRequest, Selector, every
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, every, run_spider
class CronJobSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorial1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ Spider Overview
from urllib.parse import urljoin
import json
from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider
class QuotesSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions examples/async_generator_spider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# coding=utf-8

from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider


class AsyncGeneratorSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions examples/cron_job_spider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# coding=utf-8

from xpaw import Spider, HttpRequest, Selector, every
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, every, run_spider


class CronJobSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions examples/quote_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from urllib.parse import urljoin
import json

from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider


class QuotesSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions examples/tencent_news_spider.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# coding=utf-8

from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider


class TencentNewsSpider(Spider):
Expand Down
3 changes: 1 addition & 2 deletions examples/xpath_quote_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from urllib.parse import urljoin

from xpaw import Spider, HttpRequest, Selector
from xpaw.run import run_spider
from xpaw import Spider, HttpRequest, Selector, run_spider


class XPathQuotesSpider(Spider):
Expand Down
14 changes: 10 additions & 4 deletions xpaw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@

from aiohttp import FormData

from .spider import Spider, every
from .http import HttpRequest, HttpResponse
from .selector import Selector
from .downloader import Downloader
from .spider import Spider, every
from .selector import Selector
from .item import Item, Field
from .run import run_spider, run_crawler

__all__ = ('FormData', 'HttpRequest', 'HttpResponse', 'Downloader', 'Spider', 'Selector',
'Item', 'Field', 'every')
__all__ = ('FormData',
'HttpRequest', 'HttpResponse',
'Downloader',
'Spider', 'every',
'Selector',
'Item', 'Field',
'run_spider', 'run_crawler')

del _patch

0 comments on commit ec069f7

Please sign in to comment.