| Caelum | eval: $_ = "box_8_2007-04-01_02-36-32.522.wav"; my ($y, $M, $d) = /(\d{4})-(\d\d)-(\d\d)/; [$y, $M, $d] |
| buubot | Caelum: ['2007','04','01'] |
| cos | it seems to just be there to make the regex engine do some extra pointless work, without changing what it will match |
| keram | hmm |
| Mortuis | How do you make a perl script wait or pause for a second? I'm trying to avoid hitting a server more than five times per second. |
| f00li5h | Mortuis: sleep |
| Mortuis | thanks |
| f00li5h | Mortuis: but which libs are you using? there may just be an option for it |
| Mortuis | LWP |
| f00li5h | are you screen scraping? |
| Mortuis | yeah, my wife wants a backup of her livejournal |
| f00li5h | Mortuis: your wife has a live journal? |
| Mortuis | their bot policy asks not to hit them more than 5 times per second. |
| f00li5h | do you hit her? do they have an API (livejournal, not your wife - although i'm sure her API is quite nice) |
| Mortuis | lol no, she'd kick my ass |
| f00li5h | does live journal use some kind of markup lanugage? like BBcode style? |
| Mortuis | they have an api, but this seemed easier |
| f00li5h | no, it won't be |
| Mortuis | it's all html, they have their own tags but they get translated |
| f00li5h | screen scraping should be a last resort because if you scrape the generated HTML, - you loose information - you can't post the code back - you have to parse the html (don't use a regex!) 'ya see? it's not worth the pain |
| Mortuis | hmm |
| f00li5h | now, had the sight contained buisness critical data, and lacked an API, sure |
| confound | well said |
| f00li5h | confound: ^_^ |
| Caelum | if they have a SOAP or XML-RPC api, it would be trivial |
| f00li5h | Mortuis: sorry about the rant, i've only just got out of bed |
| Mortuis | I think they do have XML-RPC Maybe I'll check that out |
| cfedde | there are some pretty good CPAN modules for mucking with that. but scraping is a good first aproximation. |
| Caelum | SOAP::Lite, which contains XMLRPC::Lite |