所以,我有一个问题,如何在oracle表 def parse(self, response):
rules = (
Rule(LinkExtractor(allow='div.listCont:nth-child(2) > ul:nth-child(1)'), callback='parse_details'),
Rule(LinkExtractor(restrict_css='ul > li > a[href*="maker"]'), follow =True),
)
for url in response.xpath('//ul[1]//li/a[contains(@href, "maker")]').css('a::attr(href)').extract():
url = response.urljoin(url)
yield scrapy.Request(url, callback=self.parse_details)
def parse_details(self, response):
yield {
'Name' : response.css('div.itmName h3:nth-child(1) > a:nth-child(1) ::text').extract_first(),
'Price' : response.css('div.itmPrice > a.price ::text').extract_first(),
}
next_page_url = response.css('li.last > a::attr(href)').extract_first()
if next_page_url:
next_page_url = response.urljoin(next_page_url)
yield scrapy.Request(url=next_page_url, callback=self.parse_details)
和Ruby Web应用程序之间建立连接?基本上,他应该将数据保存在该表中并从中读取。不想使用`plsql。
使用: Ruby: 1.8.7 轨道: 2.3.4
P.S可能是愚蠢的问题,但不知道如何实现。红宝石的新功能:)。