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

Request unsuccessful. Incapsula incident #5

Open
chriswalker01 opened this issue Feb 7, 2024 · 7 comments
Open

Request unsuccessful. Incapsula incident #5

chriswalker01 opened this issue Feb 7, 2024 · 7 comments

Comments

@chriswalker01
Copy link
Contributor

The ASX appear to be blocking automated/bot traffic to their api.

The app is no longer initializing, with errors similar to below in the logs.

Curl'ing https://www.asx.com.au/asx/share-price-research/company/BHP results in a similar error, while putting the url in a browser returns the expected json.

<html style="height:100%"><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><meta name="format-detection" content="telephone=no"><meta name="viewport" content="initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><script type="text/javascript" src="/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3"></script></head><body style="margin:0px;height:100%"><iframe id="main-iframe" src="/_Incapsula_Resource?SWUDNSAI=31&xinfo=11-20811742-0%200NNN%20RT%281707272883470%20260%29%20q%280%20-1%20-1%20-1%29%20r%280%20-1%29%20B12%284%2c315%2c0%29%20U24&incident_id=312001430051042670-103956453604729803&edet=12&cinfo=04000000&rpinfo=0&cts=9HnUVX%2bAbRhesKw%2bPBQlYcJY%2fqoo8pkO%2f4V83xur8xgbgq5I2ySdLdSlyv90WACi&mth=GET" frameborder=0 width="100%" height="100%" marginheight="0px" marginwidth="0px">Request unsuccessful. Incapsula incident ID: 312001430051042670-103956453604729803</iframe></body></html>

Do we need to change the headers or something?

@chriswalker01
Copy link
Contributor Author

I've created a fork that uses yfinance as the source instead of asx.com.au. As a result, the attributes that are available have changed, but I included as many of the original ones as I could.
https://github.com/chriswalker01/asx_sensor

@simonhq
Copy link
Owner

simonhq commented Feb 8, 2024

Thanks Chris,

That sounds promising, but I don't think you have made your fork public, so I can't see it.

Could you open it up please?

Thanks

Simon.

@chriswalker01
Copy link
Contributor Author

It says it's public. Can you try again please?

@simonhq
Copy link
Owner

simonhq commented Feb 10, 2024

Hi Chris,

yes it is there, I must have looked just before you uploaded.

Looks good to me, did you want to do a pull request?

Simon

@simonhq
Copy link
Owner

simonhq commented Feb 11, 2024

Hi Chris,

I copied the code over to my install, added the python library yfinance to my appdaemon load, but when I started it up I get a connection refused from 'fc.yahoo.com' max retries exceeded.

Anything I am doing wrong?

Simon.

@chriswalker01
Copy link
Contributor Author

chriswalker01 commented Feb 16, 2024 via email

@simonhq
Copy link
Owner

simonhq commented Apr 11, 2024

Hi Chris,

Sorry, been hectic here, it is not working for me, but if it working for you others may benefit.

I am in Australia, and I keep getting a connection refused error

Simon.

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

2 participants