LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-19-2004, 02:49 PM   #1
rootyard
Member
 
Registered: Aug 2003
Posts: 167

Rep: Reputation: 30
How to fetch source from a web page with Python


How can one pull the source from a web page and put this into a file locally for parsing later? I'd like to be able to do this with python but if anyone knows a way with Perl, that would be useful as well.
 
Old 07-19-2004, 02:56 PM   #2
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Rep: Reputation: 15
You might want to look for the urllib module. The handy urlconnect and urlretrieve functions might be what you're looking for. Connect to the URL, retrieve it and put it inside a file object.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant make web server run my local web page... Nik0s Linux - Newbie 22 10-08-2006 11:30 PM
Getting the web page in python :: What's wrong with the code ? indian Programming 1 09-12-2005 04:17 PM
my web browser "mozilla fire fox" isn't rendering the page, rather opening the page amolgupta Linux - Software 2 07-26-2005 01:41 AM
Python: loading page from forum fiomba Linux - Software 13 11-24-2004 10:51 AM
Jerky mouse when web browsers download web page stodge Linux - Software 1 07-08-2003 11:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration