robinturner: (Default)
[personal profile] robinturner
Well this is puzzling. I'm working on a quick dirty Perl hack for downloading my journal (comments and all). It goes like this:

#!/usr/bin/perl
use LWP::Simple;
for ($count=579; $count<600; $count++) {
$head="http://www.livejournal.com/talkread.bml?journal=solri&itemid=";
$url=$head . $count;
$content = get($url);
print "$content \n";
}

Of course the last bit will be changed to append to a file, rather than fill the terminal with HTML. The problem with this method is that most itemids aren't used (so you download zillions of error pages), and I can't see a pattern for the one's which are used. I mean, can anyone see anything meaningful in this sequence?

76946
77116
77555
77741

OK, the numbers get bigger, but that's not much help. Of course I could include a search string for "No such entry" and not print that to the file, but I'd still waste time downloading a few hundred error messages for each journal entry.

Date: 2002-12-06 02:08 pm (UTC)
From: [identity profile] thedward.livejournal.com
I suggest you download and use LJ::Simple. That seems like a much easier way to go about it.

Date: 2002-12-06 03:28 pm (UTC)
From: [identity profile] solri.livejournal.com
LJ::Simple does the opposite of what I want; i.e., it uploads rather than downloads. But I'm browsing through the code for useful hints. I guess I'll just have to learn those damn LJ protocols. Sigh.

Date: 2002-12-06 03:40 pm (UTC)
From: [identity profile] thedward.livejournal.com
It does both ways, look here.

Date: 2002-12-06 04:24 pm (UTC)
From: [identity profile] solri.livejournal.com
Oh yes, so it does. This is worth studying, since I'm largely doing this exercise to improve my Perl skills, which were never up to much and are now rustier than my car.

If I can get this written, then I can progress to the fun bit, which is to convert the downloaded entries to LaTeX. Of course I could just use latex2html, but then I'd still have to write something to strip out the stuff I don't want, and besides, the HTML involved in so basic it shouldn't be too hard to convert.

Nice userpic, BTW.

Dang!

Date: 2002-12-06 04:42 pm (UTC)
From: [identity profile] solri.livejournal.com
getentries.pl: Failed to get entries - LJ request failed: Client error: Protocol version mismatch: Cannot display/edit a Unicode post with a non-Unicode client.

Date: 2002-12-06 04:51 pm (UTC)
From: [identity profile] kozizi.livejournal.com
anlamıyorum bu yazılanları :(
bunlar ne için?

bi de birinin lj sini yokedemezmiyiz? >:(

Date: 2002-12-06 05:09 pm (UTC)
From: [identity profile] solri.livejournal.com
Sadece bütün LJ yazdıklarımı download etmek için. Bunu becerebilirsem, ikinci program yazarım: onları LaTeX'e çevirip, güzel bir PostScript kitapçığı yapabilirim. Belki de onu anneme veririm!

bi de birinin lj sini yokedemezmiyiz? >:(
Password'unu bilmeden çok zor. Sanırım LJ, Hotmail gibi kolayca "crack" edilmez. Ayrıca, bunu neden yapmak istiyorsun? Kötü kız ;-)

Date: 2002-12-06 05:36 pm (UTC)
From: [identity profile] kozizi.livejournal.com
kötülüğümden diilki.. :(
eimde olmadan onun günlüğünün orda olduğunu bilip açıyorum..kendime hakim olamıyorum.sonra bakıp bakıp ağlıyorum..hala en sevdiğim şey burası bu aralar..onunda burda olması iyileşmemi geciktiriyor sadece..hem benden sonra o kızla yazışmaları..zamanında keşke passwordünü alsaydım..silerdim hemen.. :(

içim burkuldu yazarken..böyle yazmayla itiraf etmek zormuş... :,(

Date: 2002-12-06 06:07 pm (UTC)
From: [identity profile] solri.livejournal.com
Türkçem zayıf olduğundan, bazı yazdıklarını anlayamadım. Ama doğru anladıysam, ona yazdıklarını silmek istiyursun. Oysa, kolay. Comment'lere girip, X işareti tıkla.

Yoksa, o günlüğü tamamem silmek mi istiyorun? Tabii ki imkansız, veya en azında çok zor. Kusura bakma, neden o kadar etkilendiğini anlamadım. Anladığım kadarıyla, o günlüğü okumaktan nefret ediyorsun, ama yinede okuyorsun. Lütfen basit bir dilde anlat!

Date: 2002-12-06 06:09 pm (UTC)
From: [identity profile] solri.livejournal.com
içim burkuldu yazarken..böyle yazmayla itiraf etmek zormuş... :,(

Amaaan, boş ver. İyi bir insana benziyorsun.

Date: 2002-12-06 06:57 pm (UTC)
From: [identity profile] evan.livejournal.com
It's intentional, to prevent people from doing exactly what you're doing. :)

There's a "syncitems" protocol designed for doing that sort of thing efficiently.

Date: 2002-12-06 07:05 pm (UTC)
From: [identity profile] solri.livejournal.com
It's intentional, to prevent people from doing exactly what you're doing. :)

Why on earth would you want to prevent that?

There's a "syncitems" protocol designed for doing that sort of thing efficiently.

Do tell. I feel like I'm trying to re-invent the wheel here.

Date: 2002-12-06 08:31 pm (UTC)
From: [identity profile] kozizi.livejournal.com
:) ben senin türk olduğunu sanıyordum.daha basit yazıcam tamam.
hmm [livejournal.com profile] stainshower benim sevgilimdi. 2.5 senedir.
bitti 3-4 ay önce.
onu friends listimden çıkardım.
o hala beni çıkarmadı.
ben user infoma giriyorum hep.
friend of kısmında onun ismini görmek istemiyorum..
yani amacım commentlerimi silmek değil.
ama çözüm yok sanırım problemim için :(

"entry yazdı mı acaba" demekten ve günlüğüne gitmekten bıktım.sadece bu.

:)
nerelisin sen.neden burdasın..eşin neler yapıyor? nerde oturuyosun? :)

Date: 2002-12-07 06:29 am (UTC)
From: [identity profile] solri.livejournal.com
Aaah, şimdi anladım. Ayrıca, geçmiş olsun.

Bildiğim kadarıyla bloke edemezsin. Sadece istersen, userinfo da ki bütün "friend of" kısmı saklayabilirsin ("Your settings" -> "Personal info").

nerelisin sen.
İngilizim
neden burdasın..
Öğretmenlik yapıyorum.
eşin neler yapıyor?
O da öğretmen.
nerde oturuyosun? :)
Ankara

Re: Dang!

Date: 2002-12-07 02:23 pm (UTC)
From: [identity profile] solri.livejournal.com
Hah, scotched that one - just needed to comment out a few lines. Just need to sort out the weird timestamp thing and I'm there.