mirror of https://github.com/scrapy/scrapy.git
minor doc update for making it more windows-friendly
This commit is contained in:
parent
80b96fc195
commit
b296d4169e
|
|
@ -152,7 +152,7 @@ extracted item into a file using `pickle`_::
|
|||
class StoreItemPipeline(object):
|
||||
def process_item(self, domain, response, item):
|
||||
torrent_id = item.url.split('/')[-1]
|
||||
f = open("/tmp/torrent-%s" % torrent_id, "w")
|
||||
f = open("torrent-%s.pickle" % torrent_id, "w")
|
||||
pickle.dump(item, f)
|
||||
f.close()
|
||||
|
||||
|
|
|
|||
|
|
@ -48,17 +48,22 @@ You can also override one (or more) settings from command line using the
|
|||
|
||||
Example::
|
||||
|
||||
scrapy-ctl.py crawl domain.com --set=LOG_FILE:/tmp/scrapy.log
|
||||
scrapy-ctl.py crawl domain.com --set LOG_FILE=scrapy.log
|
||||
|
||||
2. Environment variables
|
||||
------------------------
|
||||
|
||||
You can populate settings using environment variables prefixed with
|
||||
``SCRAPY_``. For example, to change the log file location::
|
||||
``SCRAPY_``. For example, to change the log file location un Unix systems::
|
||||
|
||||
$ export SCRAPY_LOG_FILE=/tmp/scrapy.log
|
||||
$ export SCRAPY_LOG_FILE=scrapy.log
|
||||
$ scrapy-ctl.py crawl example.com
|
||||
|
||||
In Windows systems, you can change the environment variables from the Control
|
||||
Panel following `these guidelines`_.
|
||||
|
||||
.. _these guidelines: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx
|
||||
|
||||
3. scrapy_settings
|
||||
------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue