eliangcs / pystock-crawler

(UNMAINTAINED) Crawl and parse financial reports (XBRL) from SEC EDGAR, and daily stock prices from Yahoo Finance
MIT License
311 stars 100 forks source link

Price report is empty #24

Closed jsnyder8844 closed 6 years ago

jsnyder8844 commented 6 years ago

Hello,

I'm able to use your script to run the fundamental reports just fine.

However, i'm getting an empty report when i try to look up prices. Can you please help?

This is the script I used:

Johns-MacBook-Air:~ JohnSnyder$ pystock-crawler prices GOOG -o test.csv --sort 2018-04-15 02:25:46-0700 [scrapy] INFO: Command: scrapy crawl yahoo -a symbols="GOOG" -t csv -o "/Users/JohnSnyder/test.csv" 2018-04-15 02:25:46-0700 [scrapy] INFO: Creating temporary config: /Users/JohnSnyder/scrapy.cfg 2018-04-15 02:25:47-0700 [scrapy] INFO: Scrapy 0.24.4 started (bot: pystock-crawler) 2018-04-15 02:25:47-0700 [scrapy] INFO: Optional features available: ssl, http11 2018-04-15 02:25:47-0700 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'pystock_crawler.spiders', 'FEED_URI': '/Users/JohnSnyder/test.csv', 'LOG_LEVEL': 'INFO', 'SPIDER_MODULES': ['pystock_crawler.spiders'], 'HTTPCACHE_ENABLED': True, 'RETRY_TIMES': 4, 'BOT_NAME': 'pystock-crawler', 'COOKIES_ENABLED': False, 'FEED_FORMAT': 'csv', 'HTTPCACHE_POLICY': 'scrapy.contrib.httpcache.RFC2616Policy', 'HTTPCACHE_STORAGE': 'scrapy.contrib.httpcache.LeveldbCacheStorage'} 2018-04-15 02:25:47-0700 [scrapy] INFO: Enabled extensions: FeedExporter, LogStats, TelnetConsole, CloseSpider, WebService, CoreStats, PassiveThrottle, SpiderState 2018-04-15 02:25:47-0700 [scrapy] INFO: Enabled downloader middlewares: HttpAuthMiddleware, DownloadTimeoutMiddleware, UserAgentMiddleware, RetryMiddleware, DefaultHeadersMiddleware, MetaRefreshMiddleware, HttpCompressionMiddleware, RedirectMiddleware, ChunkedTransferMiddleware, DownloaderStats, HttpCacheMiddleware 2018-04-15 02:25:47-0700 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware 2018-04-15 02:25:47-0700 [scrapy] INFO: Enabled item pipelines: 2018-04-15 02:25:47-0700 [yahoo] INFO: Spider opened 2018-04-15 02:25:47-0700 [yahoo] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min) 2018-04-15 02:25:47-0700 [yahoo] ERROR: Error downloading <GET http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=&e=&f=&g=d&a=&b=&c=&ignore=.csv> Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/twisted/internet/_resolver.py", line 200, in finish resolutionReceiver.resolutionComplete() File "/usr/local/lib/python2.7/site-packages/twisted/internet/endpoints.py", line 900, in resolutionComplete d.callback(addresses) File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 459, in callback self._startRunCallbacks(result) File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks self._runCallbacks() --- --- File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/internet/endpoints.py", line 954, in startConnectionAttempts "no results for hostname lookup: {}".format(self._hostStr) twisted.internet.error.DNSLookupError: DNS lookup failed: no results for hostname lookup: ichart.finance.yahoo.com.

2018-04-15 02:25:47-0700 [yahoo] INFO: Closing spider (finished) 2018-04-15 02:25:47-0700 [yahoo] INFO: Dumping Scrapy stats: {'delay_count': 0, 'downloader/exception_count': 5, 'downloader/exception_type_count/twisted.internet.error.DNSLookupError': 5, 'downloader/request_bytes': 1365, 'downloader/request_count': 5, 'downloader/request_method_count/GET': 5, 'finish_reason': 'finished', 'finish_time': datetime.datetime(2018, 4, 15, 9, 25, 47, 375880), 'httpcache/miss': 5, 'log_count/ERROR': 1, 'log_count/INFO': 7, 'scheduler/dequeued': 5, 'scheduler/dequeued/memory': 5, 'scheduler/enqueued': 5, 'scheduler/enqueued/memory': 5, 'start_time': datetime.datetime(2018, 4, 15, 9, 25, 47, 337781)} 2018-04-15 02:25:47-0700 [yahoo] INFO: Spider closed (finished) 2018-04-15 02:25:47-0700 [scrapy] INFO: Deleting /Users/JohnSnyder/scrapy.cfg 2018-04-15 02:25:47-0700 [scrapy] INFO: Sorting: /Users/JohnSnyder/test.csv 2018-04-15 02:25:47-0700 [scrapy] INFO: No need to sort empty file: /Users/JohnSnyder/test.csv