Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 13th, 2011, 3:53 AM   #1
kgqmbqrq
Banned
 
Join Date: May 2011
Posts: 39
Rep Power: 0 kgqmbqrq is on a distinguished road
What are ways to access the internet using Python?

Hey guys,

So, I'd like to do some basic things on the web using Python. For example, have it open a webpage for me, or have it download all the pictures on a given thread I input.

What are the best ways do accomplish this?

Thanks in advance for any help!
kgqmbqrq is offline   Reply With Quote
Old Jun 13th, 2011, 7:59 AM   #2
pythonscript
Entrepreneur
 
Join Date: Jan 2009
Location: Edinburgh, Scotland
Posts: 139
Rep Power: 6 pythonscript is on a distinguished road
Re: What are ways to access the internet using Python?

For parsing a web page, I suggest you take a look at the Beautiful Soup module. For downloading the page, the urllib2 module is a good place to start. It will be much more difficult to generalise an image downloader than to write one for a single specific page.
pythonscript is offline   Reply With Quote
Old Jun 16th, 2011, 1:22 AM   #3
danieljames123
Programmer
 
Join Date: May 2011
Posts: 60
Rep Power: 4 danieljames123 is on a distinguished road
Re: What are ways to access the internet using Python?

Quote:
Originally Posted by pythonscript View Post
For parsing a web page, I suggest you take a look at the Beautiful Soup module. For downloading the page, the urllib2 module is a good place to start. It will be much more difficult to generalise an image downloader than to write one for a single specific page.
You are right but I think http://www.mayukhbose.com/python/IEC/index.php it will be help him.
danieljames123 is offline   Reply With Quote
Old Jun 16th, 2011, 8:09 AM   #4
pythonscript
Entrepreneur
 
Join Date: Jan 2009
Location: Edinburgh, Scotland
Posts: 139
Rep Power: 6 pythonscript is on a distinguished road
Re: What are ways to access the internet using Python?

I'm hesitant to recommend something that isn't browser independent, and since the OP didn't seem to need browser control (downloading images doesn't necessarily require opening a browser) I thought some basic python libraries would be the best.

Also, your link doesn't seem to have been updated in a while, since the library has only been tested up to python 2.4 (according to its site). I realise that some software still ships with 2.4 as a dependency, but unless you're using a major package like that, there doesn't seem to be any reason to install such an outdated version.
pythonscript is offline   Reply With Quote
Old Jun 18th, 2011, 6:40 PM   #5
sixstringartist
Programming Guru

 
Join Date: Jun 2005
Posts: 1,326
Rep Power: 11 sixstringartist will become famous soon enough
Re: What are ways to access the internet using Python?

What do you mean by open a webpage? As in launch your browser and load a particular page?
sixstringartist is offline   Reply With Quote
Old Jul 6th, 2011, 5:47 AM   #6
D0m1nat3
Newbie
 
Join Date: Jul 2011
Posts: 2
Rep Power: 0 D0m1nat3 is on a distinguished road
Re: What are ways to access the internet using Python?

I also use mechanize to interface with forms etc.
D0m1nat3 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basics of Python Xarver Python 5 Aug 24th, 2011 8:20 PM
can u access the internet with c++? hervens48 C++ 22 May 18th, 2006 10:23 PM
[tutorial] Python for programming beginners coldDeath Python 30 Dec 14th, 2005 11:35 AM
Python - A Programmers Introduction coldDeath Python 17 Aug 19th, 2005 12:41 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC