Skip to content

Commit

Permalink
config scrapy-mongodb pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos committed Jul 23, 2014
1 parent 1b31246 commit 46c737c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ coverage.xml
# Sphinx documentation
docs/_build/

# Scrapyd files
dbs/
items/
logs/
*.pid
12 changes: 10 additions & 2 deletions pyjobs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@
NEWSPIDER_MODULE = 'pyjobs.spiders'

ITEM_PIPELINES = {
'pyjobs.pipelines.MongoPipeline': 0,
'scrapy_mongodb.MongoDBPipeline': 0,
}

# Crawl responsibly by identifying yourself (and your website) on the user-agent
# Config MongoDB
MONGODB_URI = 'mongodb://localhost:27017'
MONGODB_DATABASE = 'pyjobs'
MONGODB_COLLECTION = 'jobs'
MONGODB_UNIQUE_KEY = 'uid'


# Crawl responsibly by identifying yourself (and your website)
# on the user-agent
#USER_AGENT = 'pyjobs (+http://www.yourdomain.com)'
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pyasn1-modules==0.0.5
pycparser==2.10
pymongo==2.7.1
queuelib==1.1.1
scrapy-mongodb==0.7.1
service-identity==1.0.0
six==1.7.3
w3lib==1.6
Expand Down
2 changes: 1 addition & 1 deletion scrapy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
default = pyjobs.settings

[deploy]
#url = http://localhost:6800/
url = http://localhost:6800/
project = pyjobs

0 comments on commit 46c737c

Please sign in to comment.