Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
A high performance database engine using optimized data access for all development environments including Delphi, Visual Studio .NET, Visual Basic, Visual FoxPro. and more. Learn More
  #1  
Old April 24th, 2008, 09:07 PM
pkirkaas pkirkaas is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Posts: 12 pkirkaas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 17 m 46 sec
Reputation Power: 0
How to automatically interact with a web page?

Hi;

This is sort of the opposite of web programming. In this case, I am not programming a web page, I want to write a program or record a script, whatever, to automatically interact with a web page.

This is not malicious -- I am trying to provide my users with a simplified interface to a (external) website, so they don't have to answer or even understand all the questions & buttons.

I suppose there are some simple tools for this, but I don't know them. Any suggestions?

To calm any fears I am trying to write an evil bot:

I am providing my clients with a preconfigured computer that performs a certain service -- video streaming. I want to make it as simple for them as possible to use, so automate almost everything. One of the things that has to be done is go on to the web page of my streaming service provider, log on, and enter the IP address of the computer that will be doing the streaming. I want to automate all that to spare the customer from the effort, plus I don't want to give him/her my account logon.

Is there any language or scripting or macro recording or anything tool that can help me do that?

Thanks,

Paul

Reply With Quote
  #2  
Old April 24th, 2008, 09:11 PM
ryon420's Avatar
ryon420 ryon420 is offline
Oscar Wilde addict
Click here for more information
 
Join Date: Jun 2006
Location: Was lost, then found, now lost again.
Posts: 2,526 ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)ryon420 User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 1496 Folding Title: Novice Folder
Time spent in forums: 4 Months 2 Weeks 5 Days 23 h 27 m 19 sec
Reputation Power: 670
Send a message via MSN to ryon420 Send a message via Google Talk to ryon420
Did you just describe a web browser? I think you did.

Define "interact." I am a bit lost on that part. What do you want it, and expect it, to do.

Quote:
so they don't have to answer or even understand all the questions & buttons.


If they don't understand the questions, dumb it down for them. Anyone can understand buttons.
__________________

Warning, the post above may contain extreme sarcasm, crude language, and code that may confuse amateurs and professionals.


Helpful stuff: Google your question first | Read the rules | How to ask a question
Sites: Philosophorum: "where even the trolls are smart"
"A bad plan is one carved in stone" -- Publilius Syrus


Reply With Quote
  #3  
Old April 24th, 2008, 09:14 PM
medialint's Avatar
medialint medialint is offline
spirit duplicator
Click here for more information.
 
Join Date: Apr 2004
Location: \\Firecrate\
Posts: 11,886 medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)medialint User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 212149 Folding Title: Super Ultimate Folder - Level 1Folding Points: 212149 Folding Title: Super Ultimate Folder - Level 1Folding Points: 212149 Folding Title: Super Ultimate Folder - Level 1Folding Points: 212149 Folding Title: Super Ultimate Folder - Level 1Folding Points: 212149 Folding Title: Super Ultimate Folder - Level 1Folding Points: 212149 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 1 Week 6 Days 16 h 2 m 59 sec
Reputation Power: 2050
I think what he's looking for is to create a new (desktop application) interface to perform form POSTs or parse the results from passing certain url parameters, etc.

Which is fairly trivial in most languages.

A practical example I can think of for this would be to extract data from bls.gov. Go ahead and look around there :-) You can see how something that automatically navigates around there can be very handy ...
__________________
medialint.com

Now I don't know, but I been told it's hard to run with the weight of gold.
Other hand I have heard it said, it's just as hard with the weight of lead.

Reply With Quote
  #4  
Old April 24th, 2008, 09:18 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information.
 
Join Date: Jan 2005
Location: Florida
Posts: 2,591 hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 26359 Folding Title: Starter FolderFolding Points: 26359 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 1 Day 3 h 33 m 41 sec
Reputation Power: 1165
Quote:
Originally Posted by ryon420
Anyone can understand buttons.


You'd be surprised at how many that can't understand buttons. I've ran into one person that literally needed to record me showing her how to do just about anything on her computer... opening up "My Computer" or even just copy and paste....

Had another person that had a corrupt IE install, so I installed Firefox and told her to use that... The problem with the IE install was causing her yahoo mail not to work... in FF, she still wasn't sure what to click to send mail (The Send button), so spent about 20 minutes on the phone with her trying to walk her through sending yahoo mail.
Comments on this post
ryon420 agrees: Holy ****...hopefully social Darwinism takes care of these people

Reply With Quote
  #5  
Old April 24th, 2008, 09:29 PM
sizablegrin's Avatar
sizablegrin sizablegrin is online now
Stubborn ol' L'User
Click here for more information.
 
Join Date: Jun 2005
Posts: 2,710 sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level)sizablegrin User rank is General 3rd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 14 h 54 m 8 sec
Reputation Power: 1176
I would suggest that you have a look at Python and Beautiful Soup. After that, you can either give up or go to any other language you like. The principles are there.

One doesn't really interact with web pages. One responds. Some quibbles might be made with this, considering script, but the interaction is somewhat fixed and doesn't propagate too well.

If one responds appropriately, one might interact with the server, presuming it's designed for that purpose.
Comments on this post
ryon420 agrees: Beautiful Soup is great with Python; PHP with cURL can work too.
__________________
The population in my hometown has been stable for 50 years. Every time a woman gets pregnant, a man leaves.

Last edited by sizablegrin : April 24th, 2008 at 09:32 PM.

Reply With Quote
  #6  
Old April 24th, 2008, 10:23 PM
pkirkaas pkirkaas is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Posts: 12 pkirkaas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 17 m 46 sec
Reputation Power: 0
Well, medialint, you're right. I want to create a desktop application (or rather, a button on an application) that logs in to a web page, fills in some fields, then presses a button/link on the page.

This is not a web page I control; it is a web page of my streaming server provider. I don't want to ask my users to fill in an ip address, I don't want to give them my login, and frankly I don't want them to know who my streaming server provider is or that I use one -- anything that goes on under the hood.

I am not exactly describing a web browser per se, but rather a desktop application that acts like a web browser as far as the website is concerned, but not as far as the user is concerned.

To put it another way, I don't know exactly how a browser fills in a field or tells the webserver which link/button it clicked on.

I'll look at Python, but I suppose what you're saying is I should look at http protocol?

Thanks for any patience.

Paul

Quote:
Originally Posted by medialint
I think what he's looking for is to create a new (desktop application) interface to perform form POSTs or parse the results from passing certain url parameters, etc.

Which is fairly trivial in most languages.

A practical example I can think of for this would be to extract data from bls.gov. Go ahead and look around there :-) You can see how something that automatically navigates around there can be very handy ...

Reply With Quote
  #7  
Old April 24th, 2008, 11:39 PM
disablek disablek is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 26 disablek User rank is Sergeant (500 - 2000 Reputation Level)disablek User rank is Sergeant (500 - 2000 Reputation Level)disablek User rank is Sergeant (500 - 2000 Reputation Level)disablek User rank is Sergeant (500 - 2000 Reputation Level)disablek User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 44 m 57 sec
Reputation Power: 0
Just pop open the source of the page, find out the variables, then have your desktop application do a POST to the webserver. After that you have to handle the reply from the server. Sometimes, it's a normal text/html with a link to some other uri, sometimes, it's a application/octet stream that you'll have to handle yourself. The browser usually is able to either a) pop open the appropriate app to handle the incoming data, b) show whatever it got as a whole bunch of data.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDev Shed Lounge > How to automatically interact with a web page?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway