S
S
Sergey Bard2017-10-06 09:32:43
Scrapy
Sergey Bard, 2017-10-06 09:32:43

How to run the parser on the server?

Hello. That means what a problem, I wrote a scrapy parser on my local computer (Python began to study not so long ago), and so in the process of work I installed various add-ons. modules for the base, etc., now that I have everything ready, I need to transfer this script to the server and make it work on time (make cron), but I just can’t figure out how to do it, while studying python I came across virtualenv and realized that I was doing everything wrong up to this point), and the parser, as you understand, which you need to run with the "scrapy crawl [name]" command, I wrote without a virtual environment (please give me advice in which direction to dig, As I understand it do I need to shove my parser into a virtualenv, install the necessary modules inside and upload it to the server?,links ), do I also need to follow this example (of course, instead of dzhanga, I will have my parser), or did I drive myself to the wrong place and everyone makes it much easier ???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2017-10-06
@serg_small_developer

umm... you set up virtualenv on the server
-> install the necessary modules
-> upload the parser
-> use

E
Evgen, 2017-10-06
@Verz1Lka

If you installed modules on the server without virtualenv, and you need to run cron, then this:
1) which scrapy - take the path
2) crontab -e
1 * * * * cd /home/ubuntu/scrapy/scraper && /usr/local/ bin/scrapy crawl your_parser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question