I can haz mp4?

Let’s Encrypt was so ridiculously easy to install on my private web server that I wondered whether I could switch to mp4s for gifs. I mean, video snippets. I can’t do those directly on wordpress.com, because wordpress.com does not support controlling where mp4 videos appear in email posts.

So let’s try!

Did it work? Huh? Huh?

[Edit: It does seem to kinda work, but not in Chromium? And the snippets don’t autoplay, even if the WordPress pages says that’s supported. So once again, like for the nine thousandth time, I’m struggling with wordpress.com. I should move my blog off of this site and host it myself… *sigh*]

Innovations in Web Scraping

I added event descriptions to my Concerts in Oslo a few months back. It mostly worked kinda OK, but it’s using heuristics to find out what “the text” is, so it sometimes includes less-than-useful information.

In particular, those fucking “YES IT KNOW IT”S A FUCKING COOKIE!” texts that all fucking web sites slather their pages with now fucking get in the way, because those texts are often a significant portion of the text on any random page. (Fucking.)

But I added filtering for the those bits, and things looked fine.

Yesterday I was told that all Facebook events are basically nothing but that cookie warning (in Norwegian), and that’s because the Facebook event pages now contain nothing but that text, plus some scaffolding to load the rest as JSON:

To build the Facebook event page, about 85 HTTP calls are done and 6MB worth of data is loaded.

I contemplated reverse-engineering the calls to get the event description via the graphql calls (since Facebook has closed all access to public events via their API), but then it struck me: The browser is showing me all this data, so perhaps I could just point a headless browser towards the site, and then ask it to dump its DOM, and then I can parse that?

Which I’ve now done.

I know, it’s probably a common technique, but I’d just not considered it at all. A mental block of some kind, I guess. I’m so embarrassed. Of course, it now takes 1000x longer to scrape a Facebook event than something that just puts the event descriptions in the HTML, but whatevs. That’s what you have caches for.

I’m using PhantomJS, and it seems to work well (even if development has been discontinued). PhantomJS is so easy and pleasant to work with that I think I’ll try to stick with it until it disappears completely. Is there another headless browser that’s as good? All the other ones I’ve seen are more… enterprisey.

Stamped Box

Hey! I got a package from France with the most stamps ever!

Just look at it! Such variety! I’m very impressed.

The contents are even better. It’s the Éric Rohmer bluray/DVD box set. The Intégrale. That sounds much classier than “complete edition box set”. I mean, if that’s what it means? The French are so classy.

I was completely unaware of Rohmer until last year (I think), when I happened upon a DVD of one of his films in a used DVD store somewhere. I liked his name, so I bought it. I think it was An Autumn Tale, and I was blown away by its subtle silences. It reminded me of a Nouvelle Vague film, only less showy. I was surprised to find out that that’s what it was, basically: He was part of that wave of filmmakers, and never stopped making films.

So I’ve been looking for his films the last few months, and I was overjoyed when I found this box set on the web. And the reviews alleged that there were English subtitles on them, but I’ve been burned by that before, because the French really hate pandering to foreigners by putting (optional) subtitles on their DVDs.

Each film in this beautiful box set is on bluray and DVD, and I’ve done spot checks on a few, and they all turn out to have English subtitles! Yay!

But only on the film itself. The supplementary material, which there is a lot of, is subtitle-free. Boo!

And there’s the nerdiest tech specs ever. “Encodage MPEG-4 AVC”. Mais oui.

I also got the Agnès Varda today which… isn’t as lavish.

Useful Consumer Review

When buying electronics, the range of products available is vastly superior in the US compared to any European country. Fortunately, power adapters are now almost all “universal”; that is, they accept 110V-230V. So the only problem is the physical interface.

I’ve been using these teensy adapters for a while, but the problem is…

.. that they’re extremely rickety. They neither have a solid grip on the Euro side, and the US side isn’t satisfactory, either, so it just feels… bad.

So I went looking for other variations, and I found these somewhere in Europe. They are totes unrickety, but they’re huge. For something that does nothing but accept one plug and plug into another plug (there’s no voltage adaptering), is silly. So the other day I wondered… surely something smaller has to exist? I mean, something that’s just flush with the Euro “Schuko” plug? I mean, it should fit in there? Why doesn’t it exist?

Behold! It does exist!

It’s not totally flush, which is weird, because the US plug is shallower than the Euro er hole, but still, not. But it’s almost there! And the grip on both ends is very satisfactory. Nothing rickety about these.

They’re called “OREI American USA To European Schuko Germany Plug Adapters CE Certified Heavy Duty” *phew* and they’re about $1 each.

And they’ve been working for several hours now, so they must be perfect.

You have to wonder what the people who made that huge adapter were thinking… “This will do”? No, it won’t.

Innovations in Balcony Furniture

It’s been a very pleasant summer here (I’m not even wearing a sweater now), so I’ve been spending a lot of time out on the balcony in the evening.

I’ve had this chair for yonks, but it has two problems: 1) it’s not that comfy, and 2) it’s too tall. The house I’m in is on a hill, and somehow it’s always windy here no matter what. Which is pleasant in one way, but having your head buffeted by winds all the time is wearying.

So I got a Royal Botania Beacher chair, because it looked like it was going to get my head below the level of the tarpaulin, and it was super-comfy in the store. Kinda like a rocking chair beach chair. And it’s heavy, so the winds won’t blow it off of the balcony.

So I assembled the blue sitting surface, and that… er… looks very low indeed.

I gave it a trial sit anyway, and I ALMOST DIED! TRAPPED! Getting out of the chair took me like five minutes. It’s the most dramatic thing that’s ever happened to me!

Perhaps I should have read the instructions first. Over and around, over and around…

There!

I’m a genius! And it is, indeed, very comfy. And very easy to get out of due to a pretty construction.

Now, back to the balcony…