Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
119 views
in Technique[技术] by (71.8m points)

java - Download Button Post -> Convert to url Link

I have multiple download buttons in a webpage (picture bellow), and need to download some of those files parse their contents.

enter image description here

when I click on them to download, the download link shown in the Ctrl+J Download pane it's actually the webpage url and not the actual file url.

enter image description here

so I cannot use some libraries to download it directly, I'm using Selelnium so I didn't want to actually "click" through Selenium and then Download it.

When I inspect the element it returns:

<input type="submit" name="ctl00$CommonPlaceHolder$ctl03" value="Download" title="H:SIDISmaintenance2020_12_0793Y5SRZ85MJ7823932020_12_07_05_40_075040760_162uasseea02_20201207-054114_config.txt" style="font-size:10pt;margin-right:10px;">
<span class="dxeBase" id="ctl00_CommonPlaceHolder_ctl04" style="color:Black;font-size:10pt;">5040760_162uasseea02_20201207-054114_config.txt</span>

Is there a better way to deal with this without having do do this? https://blog.codecentric.de/en/2010/07/file-downloads-with-selenium-mission-impossible/

I have read something about Curl post forms but I know litte to nothing about it.

Any ideas on where to start would be appreciated.

question from:https://stackoverflow.com/questions/66066146/download-button-post-convert-to-url-link

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...