Timeout in .sh file
-
@thwr said in Timeout in .sh file:
That doesn't matter at all. There are only a few factors:
- Do you need any form of authentication - if so, what exactly? A web based form, a HTTP BASIC AUTH (your browser shows a popup for credentials) or something else (some auth protocols can be tricky)
- Can the machine running the script reach the webserver?
- Is there any script language available? not required, just a plus
- Any download tool available? curl, powershell?
You see, it's pretty simple. Most questions are already answered. We now need to know what kind of authentication your webserver requires. Simply start your favorite browser in incognito mode (shift + ctrl + p in Chrome) and navigate to your URL. There are no cookies or caches involved in that moment. Tell us what you see, maybe create a screenshot.
As checked the link in the browser by incognito window there is not Login Credentials was asked where the file get downloaded without any issues.
1)As of now i dont need any authorization to download the file
2)The machine which is running is able to reach the Webserver
3)No script language.Just making .sh file to download the files consecutively
4)I am trying the process in Ubuntu and same needs to be worked in Mac but tried the Curl which is creating the file which have the same link inside that file once i click on that link the file will be downloadingI need to download the Files automatically in Downloads Test Folder in the .csv format first
-
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
That doesn't matter at all. There are only a few factors:
- Do you need any form of authentication - if so, what exactly? A web based form, a HTTP BASIC AUTH (your browser shows a popup for credentials) or something else (some auth protocols can be tricky)
- Can the machine running the script reach the webserver?
- Is there any script language available? not required, just a plus
- Any download tool available? curl, powershell?
You see, it's pretty simple. Most questions are already answered. We now need to know what kind of authentication your webserver requires. Simply start your favorite browser in incognito mode (shift + ctrl + p in Chrome) and navigate to your URL. There are no cookies or caches involved in that moment. Tell us what you see, maybe create a screenshot.
As checked the link in the browser by incognito window there is not Login Credentials was asked where the file get downloaded without any issues.
1)As of now i dont need any authorization to download the file
2)The machine which is running is able to reach the Webserver
3)No script language.Just making .sh file to download the files consecutively
4)I am trying the process in Ubuntu and same needs to be worked in Mac but tried the Curl which is creating the file which have the same link inside that file once i click on that link the file will be downloadingI need to download the Files automatically in Downloads Test Folder in the .csv format first
Ah, very good. So we can safely ignore any authentication. Mostly. It's still possible that there's some kind of authentication you can't see this way, like IP source or user agent checks for example. A user agent string is basically a way to tell a webserver which browser is asking for files. BTW: sh / bash is a language on its own But let's skip that for now.
So what exactly happens when you just enter
wget -O /home/user/download/file1.csv https://your.webserver/folder/file1.csv
Is there any error message?
-
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
-
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
-
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
The data is downloading now.How to open that .csv from the terminal ?
The machine is GUI only but I accessing the same in putty ,if i need to confirm tomorrrow once present at Office -
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
The data is downloading now.How to open that .csv from the terminal ?
The machine is GUI only but I accessing the same in putty ,if i need to confirm tomorrrow once present at OfficeGreat. Erm,
cat file.csv
for example?Don't you want to know what caused you so much trouble?
-
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
The data is downloading now.How to open that .csv from the terminal ?
The machine is GUI only but I accessing the same in putty ,if i need to confirm tomorrrow once present at OfficeGreat. Erm,
cat file.csv
for example?Don't you want to know what caused you so much trouble?
The .csv file is there but the file is having another link to download the original .csv file
-
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
The data is downloading now.How to open that .csv from the terminal ?
The machine is GUI only but I accessing the same in putty ,if i need to confirm tomorrrow once present at OfficeGreat. Erm,
cat file.csv
for example?Don't you want to know what caused you so much trouble?
The .csv file is there but the file is having another link to download the original .csv file
what do you mean by "another link"? Is the link the content of the file you've downloaded?
-
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
The data is downloading now.How to open that .csv from the terminal ?
The machine is GUI only but I accessing the same in putty ,if i need to confirm tomorrrow once present at OfficeGreat. Erm,
cat file.csv
for example?Don't you want to know what caused you so much trouble?
The .csv file is there but the file is having another link to download the original .csv file
what do you mean by "another link"? Is the link the content of the file you've downloaded?
The example is "facebook,com/example.mp4" that example.mp4 is the file which needs to be downloaded but the file download as example and inside that example file Click here Link(facebook.com/example.mp4) is present and i need to click that to download that file
-
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr said in Timeout in .sh file:
@lakshmana said in Timeout in .sh file:
@thwr another doubt is whether tiny url of the internal site will be working in Wget?
why not? Oh, wait. Please try:
curl -JLO https://your.webserver/folder/file1.csv
The data is downloading now.How to open that .csv from the terminal ?
The machine is GUI only but I accessing the same in putty ,if i need to confirm tomorrrow once present at OfficeGreat. Erm,
cat file.csv
for example?Don't you want to know what caused you so much trouble?
The .csv file is there but the file is having another link to download the original .csv file
what do you mean by "another link"? Is the link the content of the file you've downloaded?
The example is "facebook,com/example.mp4" that example.mp4 is the file which needs to be downloaded but the file download as example and inside that example file Click here Link(facebook.com/example.mp4) is present and i need to click that to download that file
So what you've downloaded is actually a HTML page containing a button with a link, for example?
-
Yes
-
@lakshmana said in Timeout in .sh file:
Yes
Are you able to parse that page? Regex maybe? Just hope that the page never changes.
-
@thwr Sorry I cant understand
-
@lakshmana said in Timeout in .sh file:
@thwr Sorry I cant understand
From what I understand, you've downloaded a HTML formated file. That's what your browser reads whenever you visit a website with a browser. It contains information about the content and structure of a web page.
You could read that file yourself and grab the link that's contained. Regular expression pattern matching is a perfectly valid, easy and straight forward way to do so. You'll find tons of information with your search engine of choice.
Please understand that people here at ML for example will be happy to help you in many ways, like pointing you into the right direction or reviewing your ideas. But I simply can't do your job. It's you who gets the paycheck for solving this problem, not me or anyone else.
Let me say that again: I would be happy to provide you with directions, but it's you who needs to get the work done.
-
@thwr Hereafter i should not update any doubts in this post only Right !!!!
-
@lakshmana said in Timeout in .sh file:
@thwr Hereafter i should not update any doubts in this post only Right !!!!
If you are getting the file, but are now looking to parse it, that should be a new thread, yes.