I have a spider that I want to output its results to standard output so that it can be read by subprocess.check_output. I don't want to output to a file as an intermediary.
I've tried adding the flag '-o', 'stdout' but it doesn't work.
test = subprocess.check_output([
'scrapy', 'runspider', 'spider.py',
'-a', f"keywords={keywords}", '-a', f'domain={domain}', '-a', f'page={1}',
'-s', 'USER_AGENT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)',
])
testvariable contain? Please explain why it doesn't work.-o test.jsonat the end of that command, but that puts it into a file, which I don't want.