RE: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread G M
first attempt at scraping (should be something > trivial) > From: dery...@gmail.com > To: iamnotregiste...@hotmail.com > CC: beginners@perl.org > > On Wed, Mar 13, 2013 at 1:08 PM, G M wrote: > > Hi, > > > > Yeah I tried putting a die line in after doing a bit of

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Charles DeRykus
On Wed, Mar 13, 2013 at 1:08 PM, G M wrote: > Hi, > > Yeah I tried putting a die line in after doing a bit of googling, I've got a > print "mech ran" line where you've got "die", doesn't print anything out > though :( > > > Hm, the problem is that Mech by default throws fatal errors so if it coul

RE: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread G M
Hi, Yeah I tried putting a die line in after doing a bit of googling, I've got a print "mech ran" line where you've got "die", doesn't print anything out though :( Cheers, G > Date: Wed, 13 Mar 2013 13:04:39 -0700 > Subject: Re: Mechanize: first

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Charles DeRykus
On Wed, Mar 13, 2013 at 12:09 PM, G M wrote: > > Hi all, > > I'm making an attempt at my first screen scraping script. > > For some reason the script doesn't continue after the invocation of the get > method on the last line: > > use strict; > use WWW::

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Lawrence Statton
On 03/13/2013 01:46 PM, Andy Bach wrote: Wide character in print at /usr/local/bin/mech_test.pl line 18. that's the print page. By the way -- you can eliminate the wide-char warniung by telling perl that your terminal can eat UTF-8 encoded unicode binmode STDOUT, ":utf8"; -- To unsubscri

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Andy Bach
On Wed, Mar 13, 2013 at 2:09 PM, G M wrote: > > I'm making an attempt at my first screen scraping script. Works here: !/usr/bin/perl use strict; use WWW::Mechanize; use HTML::TokeParser; use Data::Dumper; print "Content-type: text/html\n\n"; print "setting up mech&qu

Re: Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread Jim Gibson
On Mar 13, 2013, at 12:09 PM, G M wrote: > > Hi all, > > I'm making an attempt at my first screen scraping script. > > For some reason the script doesn't continue after the invocation of the get > method on the last line: > > use strict; > use WWW::

Mechanize: first attempt at scraping (should be something trivial)

2013-03-13 Thread G M
Hi all, I'm making an attempt at my first screen scraping script. For some reason the script doesn't continue after the invocation of the get method on the last line: use strict; use WWW::Mechanize; use HTML::TokeParser; use Data::Dumper; print "Content-type: text/html\n\n"

Re: Scraping non-html webpage in Perl

2012-05-15 Thread Paolo Gianrossi
Looks like plain text, so I don't know what you exactly mean by "scraping"... You mean download it? cheers Paolo Gianrossi (An unmatched left parenthesis creates an unresolved tension that will stay with you all day -- xkcd 2012/5/9 Forma

Re: Scraping non-html webpage in Perl

2012-05-15 Thread Randal L. Schwartz
> "Formatting" == Formatting Solutions > writes: Formatting> I would like to get some information from a non-html webpage: Formatting> http://www.biomart.org/biomart/martservice?type=datasets&mart=CosmicMartusing Can't fetch that, so I have no idea what "non-html" is. What is the MIME

Re: Scraping non-html webpage in Perl

2012-05-09 Thread Matthew K
#!/usr/bin/perl use LWP::Simple; my $url = 'your website' my $content = get("$url"); print $content;   -- Matt > > From: Formatting Solutions >To: beginners@perl.org >Sent: Wednesday, May 9, 2012 8:11 AM >Subject: Scraping no

Scraping non-html webpage in Perl

2012-05-09 Thread Formatting Solutions
only. Which modules could I use or any ideas how I can go about web scraping from a webpage that is non-HTML in perl? Thanks, Martin

Re: Web scraping...move on if it fails

2008-12-14 Thread Chas. Owens
On Sat, Dec 13, 2008 at 13:26, hotkitty wrote: > HI, > > I have a bunch of news websites that are stored in my mysql db and > each morning I have a script to go to each site and download the top > stories (this is for personal use, not commercial). My problem is that > sometimes www::mechanize wil

Web scraping...move on if it fails

2008-12-14 Thread hotkitty
HI, I have a bunch of news websites that are stored in my mysql db and each morning I have a script to go to each site and download the top stories (this is for personal use, not commercial). My problem is that sometimes www::mechanize will fail to get the website because the server is busy, or fo

Re: Web scraping...move on if it fails

2008-12-14 Thread Filip van der Meeren
I am not familiar with the package, but personally I would place it in a eval block. Filip van der Meeren fi...@code2develop.com http://www.sourceforge.net/projects/perlmanager http://www.sourceforge.net/projects/xlinterpreter On 13 Dec 2008, at 19:26, hotkitty wrote: HI, I have a bunch of

Web scraping...move on if it fails

2008-12-14 Thread hotkitty
HI, I have a bunch of news websites that are stored in my mysql db and each morning I have a script to go to each site and download the top stories (this is for personal use, not commercial). My problem is that sometimes www::mechanize will fail to get the website because the server is busy, or fo

Re: web scraping

2008-04-28 Thread Octavian Rasnita
uot; <[EMAIL PROTECTED]> Sent: Monday, April 28, 2008 9:15 PM Subject: Re: web scraping Alex Goor wrote: I was hoping to write a simple program (if that's possible) to open a browser, go to a site, and scrape a piece of information from that site. For example, I was hoping to open a

Re: web scraping

2008-04-28 Thread Rob Dixon
Alex Goor wrote: > I was hoping to write a simple program (if that's possible) to open a > browser, go to a site, and scrape a piece of information from that > site. > > For example, I was hoping to open a Safari of Firefox browser, go to > nyt.com and scrape the Dow Jones Industrial Average which

web scraping

2008-04-28 Thread Alex Goor
I was hoping to write a simple program (if that's possible) to open a browser, go to a site, and scrape a piece of information from that site. For example, I was hoping to open a Safari of Firefox browser, go to nyt.com and scrape the Dow Jones Industrial Average which is on the homepage. Does

Re: Scraping

2006-06-02 Thread Ken Foskey
Found this the yesterday day... http://www.perl.com/cs/user/print/a/980 FEAR::API helps automate scraping. PS: I do not really understand the bit about template yet. Look interesting to rip reports from old mainframe systems, is it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Scraping

2006-06-01 Thread David Romano
Hi Ken, On 6/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: The second option worked to print Abercrombie, Neil to the screen. Still working on basic concepts. The split construction was suggested by someone as a way to get to pulling in all listings and ultimately all votes. All votes? Yo

Re: Scraping

2006-06-01 Thread kc68
ie/ print $browser->content; } #The above doesn't even compile for me (there's a space between '$' and 'line', and there's no # curly brackets to say you want to print $browser->content when $line matches). Your regular # expression (lo

Re: Scraping

2006-06-01 Thread David Romano
re's a space between '$' and 'line', and there's no # curly brackets to say you want to print $browser->content when $line matches). Your regular # expression (looking the page you're scraping) needs the 'i' modifier so that letter case doesn'

Scraping

2006-06-01 Thread kc68
I'm not getting past printing to the screen and to a file the page in the script below but without the list of names in the middle. Without the if line I get an endless scroll. I want to be able to pull in all names and then isolate and print one (e.g. abercrombie). Guidance and actual scr

Re: Scraping Data Behind a Form

2006-04-12 Thread Alan_C
On Wednesday 12 April 2006 12:20, [EMAIL PROTECTED] wrote: [ . . ] lynx -source http://www.theblackchurchpage.com/modules.php?name=Locator > tsthtmsource.htm That gets it the page's markup/source on my Slackware. There's javascript in that page but I don't know much about this. It appears you

Re: Scraping Data Behind a Form

2006-04-12 Thread kc68
On Tue, 11 Apr 2006 18:12:16 -0400, <[EMAIL PROTECTED]> wrote: I am slowly making my way through the process of scraping the data behind a form and can now get five results plus a series of links using the script below. I need help in doing the following: 1) Eliminating all mater

Re: Scraping Data Behind a Form

2006-04-11 Thread kc68
I am slowly making my way through the process of scraping the data behind a form and can now get five results plus a series of links using the script below. I need help in doing the following: 1) Eliminating all material on the page other than the list and the links (and ultimately

RE: Scraping Data Behind a Form

2006-04-11 Thread Dhanashri Bhate
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >>>Sent: Tuesday, April 11, 2006 4:00 AM >>>To: beginners@perl.org >>>Subject: Scraping Data Behind a Form >>> >>>I'm trying to scrape the data behind the form at >>>http://www.theblackchurch.com/m

RE: Scraping Data Behind a Form

2006-04-10 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : I don't follow - when I add the suggested line I do get No forms : at (the url). But there is a form on the page cited in the : script. There is no form on the page returned by the given url. You can double check it by navigating to that page in a browser and viewi

Re: Scraping Data Behind a Form

2006-04-10 Thread kc68
On Mon, 10 Apr 2006 19:03:25 -0400, Charles K. Clarkson <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: : I'm trying to scrape the data behind the form at : http://www.theblackchurch.com/modules.php?name=Locator As a true : beginner with Perl (I know some php), I'm working from training

RE: Scraping Data Behind a Form

2006-04-10 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : I'm trying to scrape the data behind the form at : http://www.theblackchurch.com/modules.php?name=Locator As a true : beginner with Perl (I know some php), I'm working from training : scripts that scrape from another site. There are four scripts of : increasing comple

Scraping Data Behind a Form

2006-04-10 Thread kc68
I'm trying to scrape the data behind the form at http://www.theblackchurch.com/modules.php?name=Locator As a true beginner with Perl (I know some php), I'm working from training scripts that scrape from another site. There are four scripts of increasing complexity, but on the simplest I g