Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searchterms in null #51

Open
Benny- opened this issue Jan 9, 2019 · 9 comments
Open

Searchterms in null #51

Benny- opened this issue Jan 9, 2019 · 9 comments
Assignees
Labels

Comments

@Benny-
Copy link
Owner

Benny- commented Jan 9, 2019

From #50 :

Saving downloader to disk...
Downloader successfully saved.

req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
Retry attempt: 1 of 5. Sleep period: 5 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
Retry attempt: 2 of 5. Sleep period: 25 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
Retry attempt: 3 of 5. Sleep period: 125 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
Retry attempt: 4 of 5. Sleep period: 625 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
Retry attempt: 5 of 5. Sleep period: 3125 seconds.
req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
A exception occurred while downloading. Suspending downloader to disk
Successfully saved download state
Try removing {type}.pickle file if this error persists
Issues can be reported on https://github.com/Benny-/Yahoo-ticker-symbol-downloader/issues

Traceback (most recent call last):
File "/home/mountainers/.local/bin/YahooTickerDownloader.py", line 170, in
main()
File "/home/mountainers/.local/bin/YahooTickerDownloader.py", line 111, in main
downloadEverything(downloader, tickerType, args.insecure, args.sleep, args.pandantic)
File "/home/mountainers/.local/bin/YahooTickerDownloader.py", line 40, in downloadEverything
symbols = downloader.nextRequest(insecure, pandantic)
File "/home/mountainers/.local/lib/python3.6/site-packages/ytd/SimpleSymbolDownloader.py", line 95, in nextRequest
json = self._fetch(insecure)
File "/home/mountainers/.local/lib/python3.6/site-packages/ytd/SimpleSymbolDownloader.py", line 65, in _fetch
resp.raise_for_status()
File "/home/mountainers/.local/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true

@Benny-
Copy link
Owner Author

Benny- commented Jan 9, 2019

I need some information to debug that new problem. What is your python version and how do you invoke the program?

@chicoriagithub
Copy link

my version is 👍
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

@chicoriagithub
Copy link

i open the terminal and write yahooticketdowloader.py

@Benny- Benny- self-assigned this Jan 13, 2019
@Benny- Benny- added the bug label Jan 13, 2019
@Benny-
Copy link
Owner Author

Benny- commented Jan 13, 2019

I could not reproduce this problem using Python 2.7.15rc1 on Ubuntu 18:10.

Which version of Yahoo-ticker-symbol-downloader do you use?

@chicoriagithub
Copy link

chicoriagithub commented Jan 13, 2019 via email

@Eppah-nj
Copy link

Eppah-nj commented Apr 9, 2019

Hi,
I am using the last version of Yahoo-ticker-symbol-downloader (3.0.1) with Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 12:45:02) [MSC v.1900 32 bit (Intel)] on win32.
I just wanted to know if you are working on it or if you have any workaround.

@Bruno-Hanzen
Copy link

I have had the same issue with the "null" search term.I think that the issue is on the Yahoo side, not on the python side.
If you type the URL (https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true) in a browser, you'll get some kind of yahoo homepage, not at all the expected result.
I have edited the "_fetch" method of SimpleSymbolDownloader" and added a test on "null":

if self.current_q != "null": params = { 'searchTerm': self.current_q, } else: params = { 'searchTerm': "nulll", }
Quick and dirty...

@NLockwood
Copy link

NLockwood commented Jun 6, 2019

Thank you Benny for providing this amazing tool.
Also, thank you Bruno-Hanzen! Your fix works.

@AwesomeCap
Copy link

Hi, I have the same problem.

req https://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;searchTerm=null?device=console&returnMeta=true
Retry attempt: 1 of 5. Sleep period: 5 seconds.
...

Using Python 3.6 on a Mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants