Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: Web browsing from a batch file?
- To: tlug@example.com
- Subject: Re: tlug: Web browsing from a batch file?
- From: Jim Tittsler <jwt-tlug@example.com>
- Date: Tue, 22 Sep 1998 16:59:47 +0900
- Content-Type: text/plain; charset=us-ascii
- In-Reply-To: <3.0.6.32.19980922143212.009ca9b0@example.com>; from Darren Cook on Tue, Sep 22, 1998 at 02:32:12PM +0000
- Organization: 7J1AJH/AI8A Tokyo
- References: <Pine.LNX.3.96LJ1.1b7.980922115542.9183B-100000@example.com> <Pine.LNX.3.96LJ1.1b7.980922115542.9183B-100000@example.com> <36072221236.7353WASHI@example.com> <3.0.6.32.19980922143212.009ca9b0@example.com>
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
On Tue, Sep 22, 1998 at 02:32:12PM +0000, Darren Cook wrote: > Is it possible to have a batch file (started by cron each night) access a > web server and then email the resulting HTML page? Is this something best > done in perl? Can it be done with perl -e do you think? Do you want a text rendering of the page? lynx -dump "http://www.tpc.ml.org/" -auth=jwt:bubba (the -post_data switch can also be handy for filling in forms) I rarely want the whole page, so I use Python to fetch a number of things and build up a couple of custom pages every morning. urllib will do the fetching. htmllib can be used for parsing... or just use regular expressions to pick out the data of interest and generate your own summary. >>> import urllib, string, smtplib >>> uo = urllib.urlopen("http://www.tpc.ml.org/") >>> page = uo.readlines() (Here you can use regular expressions to single out just the comic^H^H^H^H^Hdata you are interested in on each source page. I normally just leave the pages lying on the machine that I create them on... but you could mail them...) >>> page = "From: webber\nTo: jwt\nSubject: TPC\n\n" + string.join(page) >>> s = smtplib.SMTP("mail.dskk.co.jp") >>> result = s.sendmail("jwt-tlug@example.com", ["jwt-tlug@example.com"], page) (On the Windows platform you can also use Python to control MSIE through COM, but I won't mention that on the TLUG forum.) -- Jim Tittsler, Tokyo ICQ: 5981586 --------------------------------------------------------------- Next Meeting: 10 October, 12:30 Tokyo Station Yaesu central gate Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691 --------------------------------------------------------------- Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp
- References:
- tlug: Hustling NT 5 out the door
- From: Jonathan Byrne - 3Web <jq@example.com>
- Re: tlug: Hustling NT 5 out the door
- From: John De Hoog <washi@example.com>
- tlug: Web browsing from a batch file?
- From: Darren Cook <darren@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tlug: e-Mailers [was:Mew on (X)Emacs the way to go?
- Next by Date: Re: tlug: Web browsing from a batch file?
- Prev by thread: tlug: Web browsing from a batch file?
- Next by thread: Re: tlug: Web browsing from a batch file?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links