guylikeme wrote: » curl -u <user>|<password><URL> gives output of page but not the html source e.g I cant find the text thats on the page
curl www.boards.ie
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1" /> <title>boards.ie - Now Ye're Talkin'</title> [...]
guylikeme wrote: » What i want is to get the text of the page So on the boards example, i would get the thread titles
soup = .... threadName = soup.head.content
Graham wrote: » OP, you might get some more useful/specific suggestions if you explain to us what problem you're trying to solve. Is this a one-off task or will you want to scape content regularly? If it's scheduled will you be scraping the same sites/pages all the time? What do you intent to do with the content once you have retrieved it (put it in a database etc). Are you a developer looking to put together your own solution or are you just looking for the quickest/easiest way to grab the content? If you're a dev, what languages are you familiar with.
daymobrew wrote: » perl and the LWP::Simple module will download the html file and then you can parse it easily.
guylikeme wrote: » Can you show an example
#!/usr/bin/perl -w use strict; use LWP::Simple qw(get); if ($ARGV[0]) { my $html = get $ARGV[0]; # Contents of file now in $html. }