Solved

Download Flash From Remote Linux Shell

Posted on 2010-08-13
9
326 Views
Last Modified: 2013-12-26
Hi,
Is there an effective way to download Flash embedded in HTML via HTTP[S] (i.e. (but not only) youtube.com) when the final URL is not as simple a basic wget? I'm looking for a command equivalent to FireFox's Ant add-on ( http://www.ant.com/video-downloader/ )?

I have basic permissions on the remote server - bash & ksh shells with commonly used executables in /usr/bin/ .

Thanks.
0
Comment
Question by:damijim
  • 5
  • 4
9 Comments
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 33435443

You can use wget to download youtube video, but you have to find the video id.
http://www.go2linux.org/wget-to-download-youtube-videos

If you have ssh access to the server, just login to the flash server, and use rsync -avv /source/folder user@remote.myserver.com:/put/files/here

you can also use scp
while on the remote server, cd to the correct folder then:
scp -rv * user@remote.myserver.com:/put/files/here
0
 
LVL 1

Author Comment

by:damijim
ID: 33435472
Thanks.

One of the issues that I'm having with this is when the URL hits a script that adds extra GET information to the URL. I end up downloading an empty file with the GET parameters. I'm looking for a good example now as the testing I did got snagged on an internal site.
0
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 33435507

I can help you to decipher the GET if you post it here.
You will probably have to use cut -d" " -f [n] or awk to split it.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 1

Author Comment

by:damijim
ID: 33435529
Hm, so there isn't a straight forward way that I could apply this across multiple cases without the logic to break each GET down?

Here's an example from the internal request I sent:
http://192.168.91.45/decision.php?host=192.168.90.66/&S=mld52ijihiwtpdn04gkggx45&F=E751ECF1FB272CC179772FD1644C3E46532AB0C44D94FFF09FBE66CAD2BA828E0A325EB71F6B94A131FA94C600D23E8861194C64095A9F200DE72C9E6EB43673F25D39AC9DF3E7BBB3DEF0ABAA094410

I end up downloading ' host=192.168.90.66/&S=mld52ijihiwtpdn04gkggx45&F=E751ECF1FB272CC179772FD1644C3E46532AB0C44D94FFF09FBE66CAD2BA828E0A325EB71F6B94A131FA94C600D23E8861194C64095A9F200DE72C9E6EB43673F25D39AC9DF3E7BBB3DEF0ABAA094410 ' as the filename with no content.
0
 
LVL 11

Accepted Solution

by:
Pieter Jordaan earned 500 total points
ID: 33435540

Maybe it has protection against wget ?
You can make wget tell the server that it is an IE or mozilla host, if you use --user-agent=Mozilla

I can't open that URL.

I don't understand what you are trying to achieve. rsync or scp should be the best option if you want to transfer all the files.
0
 
LVL 1

Author Comment

by:damijim
ID: 33435569
Basically, I'm trying to send/receive a URL with extra several GET parameters; if the send causes a result in a file (i.e., .swf), then wget it.

I have no problem parsing HTML if the swf is obvious, but...

I'm asking a lot here, eh? :)
0
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 33435594

You will have to post the script, with the ouput you get from the Gets.
0
 
LVL 1

Author Comment

by:damijim
ID: 33469136
I still haven't quite got it, but will post when I do. Your suggestion of rsync did provide me with a new & better solution. I'm having changes made on the server I'm trying to download from. I cannot post the script due to business policies on this one. Thanks for the suggestions, they were helpful!
0
 
LVL 1

Author Closing Comment

by:damijim
ID: 33469144
Thanks for the suggestions, they helped get me on the right path of how to accomplish this.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question