Craigslist搜索的监视器。
craigslist-monitor的Python项目详细描述
Craigslist搜索监视器。
*在Windows上不起作用。
craigslist监视器使用命令行界面创建web 监控craigslist的scrapers会搜索新的列表。刮刀 监视搜索将定期检查新列表和输出 把他们的详细资料整理成文本文件。
监视Craigslist搜索
首先,创建一个经理,负责监督活动刮板:
cmonitor manager
如果cmonitor未作为脚本安装,请尝试使用sudo pip install craigslist-monitor
重新安装
接下来,要添加刮刀,必须按以下顺序指定三项:
- 刮板的名称(用于停止刮板)。
- 要搜索和监视的项目的名称或Craigslist搜索的URL。
- 刮刀将新项目的详细信息输出到的文件。
cmonitor add computer_scraper computer output
上面的刮刀示例将监视 this craigslist搜索新列表还有其他的选择 自定义cmonitor add --help下列出的刮刀。
停止刮板:
cmonitor manager -s computer_scraper
或者,要同时退出,管理器和任何活动的scraper:
cmonitor manager -q
命令/标志
经理
- 要列出所有活动的scraper的名称:cmonitor manager -l
- 退出管理器和所有活动的scraper:cmonitor manager -q
- 停止活动刮刀:cmonitor manager -s <scraper_name>
添加
- 如果列表包含由–exclude words指定的单词,则scraper 不会输出该列表的详细信息: cmonitor add <scraper details> -e[words...]
- 如果使用–续订,scraper将输出列表的详细信息 已续订(默认为关闭): cmonitor add <scraper details> -r
- 以下两个正数-时间刷新用于 random.randrange以确定刮刀的使用时间(秒) 检查新列表(默认值为60和180): cmonitor add <scraper details> -t 200 300
附加帮助
添加
usage: cmonitor add [-h] [-r] [-e word [word ...]] [-t pos_int pos_int] name monitor output Add an item (craigslist search) to be monitored. positional arguments: name The name of the process. monitor The url of a craigslist search or the item name to be monitored. output The file to which items found by the monitor will be written to optional arguments: -h, --help show this help message and exit -r, --renewals Include old posts that are renewed. -e word [word ...], --exclude-words word [word ...] Exclude posts that contain these words (not case sensitive). -t pos_int pos_int, --time-refresh pos_int pos_int The two positive integers used with randrange(lower, upper) to determine how long (in seconds) until the scraper checks for new items (first integer must be lower than the second). The default is 60 and 180.
经理
usage: cmonitor manager [-h] [-q | -l | -s scraper_name] Starts the manager if issued with no commands. optional arguments: -h, --help show this help message and exit -q, --quit Quits the manager and all scrapers -l, --list List all the currently running scrapers -s scraper_name, --stop scraper_name Stop the named scraper