?

Log in

No account? Create an account
LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

LJSM v.2.7 [Jan. 8th, 2006|01:46 am]
LiveJournal Client Discussions

lj_clients

[ati]
Hi,

There's a new version of LJSM, Livejournal backup tool.
Now it uses 'sessiongenerate' call of LJ client protocol for login instead of /login.bml screen scraping.
See http://www.offtopia.net/ljsm/index_en.html for download links, my previous post in this community for some discussion.
linkReply

Comments:
[User Picture]From: marrch_caat
2006-02-06 04:56 pm (UTC)
A bit more should be fixed. For now, it realy doesn't work if username contains an underscore (_). Here's a fix for this problem I suppose:

[...]
sub get_posts {
my ($user) = @_;
# 06.02.2006 atmc: in the domain name underscore should be replaced with dash:
$userpatched = $user;
$userpatched =~ s/_/-/gs;
[...]
# 06.02.2006 atmc: in the domain name underscore should be replaced with dash:
# if ($link =~ m#/$user.livejournal.com/(\d+)\.html#) {
if ($link =~ m#/$userpacthed.livejournal.com/(\d+)\.html#) {
$itemid = $1;
push @posts, {
'type' => 'post',
'status' => 0,
'year' => $year,
'month' => $month,
'link' => $link,
'itemid' => $itemid,
'keyword' => '',
'comments' => ($content =~ m#$itemid\.html\D+(\d+)\s+repl#)? $1 : 0
};
}
# 06.02.2006 atmc:one more case exists (when username starts with underscore):
if ($link =~ m#/users.livejournal.com\/$user/(\d+)\.html#) {
$itemid = $1;
push @posts, {
'type' => 'post',
'status' => 0,
'year' => $year,
'month' => $month,
'link' => $link,
'itemid' => $itemid,
'keyword' => '',
'comments' => ($content =~ m#$itemid\.html\D+(\d+)\s+repl#)? $1 : 0
};
}
[...]

I haven't written a line of Perl code for years, so I mya be wrong in syntax - I'm not realy sure if it possible to merge two lines with #userpatched into one and if "_" symbol should be escaped with backslash in the replace pattern. But I hope you got the point...

If you find this fix usable, couldn't you please provide me with Win32 executable compiled with - I couldn't make it myself using Perl2Exe. Here is the output I got trying to make the file:

Perl2Exe V8.70 Copyright (c) 1997-2005 IndigoSTAR Software
Registered to Alex the Marrch Caat:AlexMcCensy:20060106, ENT version
Converting 'D:/Programs/INetTools/LJSM/ljsm_272.pl' to ljsm_272.exe
ERROR: Can't open c:\Perl\p2x\p2x582exe.lib
Warning: Can't locate Digest/Perl/MD5.pm
at C:\Perl\lib\Digest\MD5.pm line 22
@INC = C:\Perl\lib, C:\Perl\site\lib, .

ERROR: Can't open c:\Perl\p2x\p2x582.dll

If you share any ideas how could I solve the problem with perl2exe, it would be wonderful too ;)
(Reply) (Parent) (Thread)
[User Picture]From: ati
2006-02-07 12:52 pm (UTC)
perl2exe version should match version of perl installed on your computer.

I'll compile .exe version tommorow, in the meantime you can use perl version, that fixes issues with new LJ's address scheme.
(Reply) (Parent) (Thread)
[User Picture]From: marrch_caat
2006-02-07 02:20 pm (UTC)
Thank you!!!
(Reply) (Parent) (Thread)