0
httpcache 미들웨어에 직접적으로 액세스 할 수 있습니까? 의사 코드Scrapy httpcache 미들웨어 데이터에 직접 액세스하는 방법
URL = 'http://scrapedsite.com/category1/item1'
print retrieveRawHtml(URL)
httpcache 미들웨어에 직접적으로 액세스 할 수 있습니까? 의사 코드Scrapy httpcache 미들웨어 데이터에 직접 액세스하는 방법
URL = 'http://scrapedsite.com/category1/item1'
print retrieveRawHtml(URL)
from scrapy.utils.response import open_in_browser
from scrapy.http import HtmlResponse
url = 'http://scrapedsite.com/category1/item1'
body = '<html>hello</html>'
response = HtmlResponse(url, body=body)
open_in_browser(response)
또는 콜백에서 같은 같은
뭔가 : 그것은 캐시에서 끌어에 캐싱이 켜져
def parse_cb(self, response):
from scrapy.utils.response import open_in_browser
open_in_browser(response)
합니다.
xx .. 너무 명백합니다 .. 너무 복잡하게 생각하고있었습니다. – Jabb
"캐싱이 켜져 있으면 캐시에서 가져옵니다.", 흥미 롭습니다. 당신은 그것을하는 방법에 대한 몇 가지 라인을 그릴 수 있습니까? 고맙습니다. – Medeiros
[HTTPCACHE_ENABLED] (http://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-enabled) 설정 참조 –