0
私はPythonで初心者ですが、EclipseにPyDevを使用して正常にScrapyをインストールしました。私はそれがこのように表示されるプログラムの開発(図が示す)Scrapy 1.1.0 - アクティブなプロジェクトがありません
[]
を実行すると、私はこのコードを実行しています:
import scrapy
class DmozSpider(scrapy.Spider):
name = "dmoz"
allowed_domains = ["dmoz.org"]
start_urls = [
"http://www.dmoz.org/Computers/Programming/Languages/Python/Books/",
"http://www.dmoz.org/Computers/Programming/Languages/Python/Resources/"
]
def parse(self, response):
for sel in response.xpath('//ul/li'):
title = sel.xpath('a/text()').extract()
link = sel.xpath('a/@href').extract()
desc = sel.xpath('text()').extract()
print title, link, desc
それは何ですか?プログラムを実行できません。
実行しているコマンドは何ですか? –
あなたはその質問を更新できますか? –
完了... – Awais