I am trying to download the excel file from URL like below. But it failed as I tried several times. There's a message "access denied" in the download data in one of the tries.
Could someone help on this? Maybe just build a simple flow to download this one?
http://www.safe.gov.cn/safe/2020/0731/16814.html
So this is just a start. If that can be done, actually I need to download the file dynamically in this URL according to the month selected.
http://www.safe.gov.cn/safe/gzhbdmyzslb/index.html
As I see, the number after the date changes for each. Not sure how to configure that either.
http://www.safe.gov.cn/safe/2020/0930/17259.html
BTW, sorry that the web supports Chinese characters only.
Solved! Go to Solution.
HI @JokeFun , for me this seems to work fine please refer to the screenshot.
Also I tried passing your link-
http://www.safe.gov.cn/safe/gzhbdmyzslb/index.html
After this I applied some transformations and fetched the links with dates.
Is this what you are looking for?If yes, kindly mark this post as solution.
Thanks.
HI @JokeFun , I have just created a workflow for the first part that is to fetch the links with dates from the index link, I am working on it to create a workflow where you can fetch the files as well and I think a macro will be a better approach to make it work. What do you think shall we give it a try using a macro?
Also, attaching the file for your reference.
One more question are just looking to fetch a file attached with this link "http://www.safe.gov.cn/safe/2020/0731/16814.html" or other links as well?
Thanks.
Hi @JokeFun , please refer to the attached workflow to download all the files related to the links.
If this helps kindly mark this post as solution.
Thanks.
Hi @grazitti_sapna ,
Thanks very much for the great help.
I tried to open the yxmd file, but failed to start the Macro since my Alteryx version is 2020.1.5 and it says it does not support the tools built in newer versions.
@grazitti_sapna with this one, It also has version problem. And when I ran it, it failed as below picture shows.
Hi @JokeFun , here is the downgraded version of the macro attached, to downgrade the version of the workflow you can open the workflow in the notepad and change yxmd version.
Regarding the error issue, here is the screenshot, I am able to fetch the data.
You can check with your IT team regarding this issue and as said our versions are different so give this a try if it works for you.
In, headers you can add this configuration.
Name Value
User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36 |
Another possible solution is :
In the Download tool configuration, uncheck "Encode URL".
If it still doesn't work kindly refer to this post as I suggested earlier you need to check with your IT team.
I hope this works for you.
Thanks.
Hi @grazitti_sapna , Thanks a lot! I have to check with our technology on this as I tried all your suggestions with no progress.