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

Yahoo! We will right back... #45

Open
yasinaslan16 opened this issue Dec 6, 2023 · 6 comments
Open

Yahoo! We will right back... #45

yasinaslan16 opened this issue Dec 6, 2023 · 6 comments

Comments

@yasinaslan16
Copy link

https://fc.yahoo.com/ is problematic because the system is running extremely slow and sometimes gives errors. Has anyone found an alternative solution?
WhatsApp Image 2023-12-06 at 13 45 22

@N1njaWTF
Copy link

N1njaWTF commented Jan 4, 2024

I'm wondering about this issue too.. its become extremely slow the past few weeks.

Have you found a solution?

@vikrampant
Copy link

I tweaked the $initialUrl in ApiClient.php around line 212. Grabbing that initial cookie from another Yahoo site vs fc.yahoo.

$initialUrl = 'https://sports.yahoo.com';

@scheb
Copy link
Owner

scheb commented Jan 6, 2024

I see the issue of slowness with the fc.yahoo.com domain as well. Though I haven't found a good alternative yet.

The suggested sports.yahoo.com doesn't do it for me, as I'm getting "Invalid Cookie" errors further down the line.

@vikrampant
Copy link

vikrampant commented Jan 6, 2024

Forgot to mention I also added another value in the header to the user agent. I pulled that from other Guzzle-based scripts I've used in the past.

public function getHeaders(): array
    {
        return [
            'User-Agent' => $this->userAgent,
            'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
        ];
    }

@scheb
Copy link
Owner

scheb commented Jan 7, 2024

Thanks for the hint! That gets the call to sports.yahoo.com working, but it doesn't initialize an A3 cookie (fc.yahoo.com does). I get a GUCS cookie instead and that doesn't seem to be sufficient to retrieve a crumb. Fetching a crumb gets me a error 500 response back.

I believe it has something to do with different locations. Especially in the EU (I'm in Germany) where we have GDPR, you have to accept the terms and conditions to get proper cookies initialized.

@N1njaWTF
Copy link

did anyone find a solution yet? :) for my tool i programmed, its very unfortunate to have such long loading times when trying to query something from Yahoo Finance..

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

No branches or pull requests

4 participants