473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Watch That Post

Hello,

I recently posted a simple Python script--Watch That
Post--that lets you watch a URL for any changes.

I wrote it to watch posts on LiveJournal, but it can
watch any URL.

It's at http://premshree.seacrow.com/code/python/watch

-Premshree Pillai

=====
-Premshree
[http://www.qiksearch.com/]

__________________________________________________ ______________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/

Jul 18 '05 #1
3 3387
Premshree Pillai wrote:
Hello,

I recently posted a simple Python script--Watch That
Post--that lets you watch a URL for any changes.

I wrote it to watch posts on LiveJournal, but it can
watch any URL.

It's at http://premshree.seacrow.com/code/python/watch

I tried running it. It works fine until it tries to run the watch function a
second time, then it does this:

Traceback (most recent call last):
File "watch.py", line 76, in ?
watch()
File "watch.py", line 58, in watch
size2 = len(urllib.urlopen(url).readlines())
File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/lib/python2.3/urllib.py", line 410, in open_file
return self.open_local_file(url)
File "/usr/lib/python2.3/urllib.py", line 420, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'

I really like the idea,

Steven
Jul 18 '05 #2
Steven wrote:
Premshree Pillai wrote:
Hello,

I recently posted a simple Python script--Watch That
Post--that lets you watch a URL for any changes.

I wrote it to watch posts on LiveJournal, but it can
watch any URL.

It's at http://premshree.seacrow.com/code/python/watch

I tried running it. It works fine until it tries to run the watch function
a second time, then it does this:

Traceback (most recent call last):
File "watch.py", line 76, in ?
watch()
File "watch.py", line 58, in watch
size2 = len(urllib.urlopen(url).readlines())
File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/lib/python2.3/urllib.py", line 410, in open_file
return self.open_local_file(url)
File "/usr/lib/python2.3/urllib.py", line 420, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'

I really like the idea,

Steven


Try to provide the protocol:
import urllib
urllib.urlopen("www.kde-apps.org") Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/local/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/local/lib/python2.3/urllib.py", line 410, in open_file
return self.open_local_file(url)
File "/usr/local/lib/python2.3/urllib.py", line 420, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: 'www.kde-apps.org' urllib.urlopen("http://www.kde-apps.org") <addinfourl at 1078699980 whose fp = <socket._fileobject object at
0x404b47d4>>


(Just a guess)

Peter

Jul 18 '05 #3
Steven wrote:

I tried running it. It works fine until it tries to run the watch function a
second time, then it does this:

Traceback (most recent call last):
File "watch.py", line 76, in ?
watch()
File "watch.py", line 58, in watch
size2 = len(urllib.urlopen(url).readlines())
File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/lib/python2.3/urllib.py", line 410, in open_file
return self.open_local_file(url)
File "/usr/lib/python2.3/urllib.py", line 420, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'

I really like the idea,

Steven


The URLs in the url file need to start with http://

Matt
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jason | last post by:
Does anyone have any ideas on a PAGE WATCH tool or an application that allows a user to be notified when page changes automatically by email. My immediate thoughts would be to use the FSO object...
4
by: vladimir | last post by:
All, I have seemingly quite known problem, namely I need to watch overloaded in quick watch(by own vector) but I can not. It says overloaded operator is not found. And that is claimed normal...
3
by: Neil | last post by:
Hi, If I have the code line "DateTime d1 = DateTime.Now;" and look at d1 in the watch window, I thought I'd only see the properties of the DateTime object variable d1. However I seem to be...
2
by: Peter Steele | last post by:
Say I have a managed C++ app with some code that looks something like this: void MyMethod() { struct Point { int x, y; }; Point* p = new Point; p.x = 1; p.y = 2;
7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
7
by: Kevin Spencer | last post by:
Greetings Fellow Inmates, My partner in crime and I have been compiling some observations regarding key words and phrases to watch out for in newsgroup postings. Employing an understanding of...
8
by: Greg | last post by:
Dear all, I've trouble with debugging a huge programm. I want to look into the properties of an object when I am at a breakpoint. But in the watch window he tell's me that the object is "out of...
2
by: mmxmsmmzm | last post by:
Would everyone begin to post JavaScript editors that include watch and debug windows! These tools are probably very new... but posting responses to this post will aid in gathering a number of...
176
by: . | last post by:
9/11 Mysteries http://video.google.com/videoplay?docid=-8172271955308136871 http://www.911weknow.com Ignore those who would go to great effort and expend much of heir time in poo-pooing this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.