Apache Web Server

配置 cgi-bin

https://blog.csdn.net/typ2004/article/details/59174162

一个比较全面的教程

注意

配置 cgi-bin 目录权限

1
2
3
4
5
6
7
ScriptAlias /cgi-bin/ /home/sawyer/web/cgi-bin/ # 注意: 这里不可以忽略最后的“/”
<Directory "/home/sawyer/web/cgi-bin/">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Require all granted
        allow from all
</Directory>

scrapy ---- a python netcrawler framework

xpath 兼容问题

在 scrapy shell 中 xpath 能提取到结果, 然而,spider.py 中不能提取到结果,可能原因是 scrapy 不支持其中 xpath 的某些特性。

解决方法

重写一个 xpath, 尽量不要使用高级的 xpath 功能