Full text import for Le Monde

Hi - big LingQ fan here, learning French.

lemonde.fr is one of my primary sources of material, but unfortunately, because the full text of the article isn’t available via a share link, only a portion of each article gets imported.

I recently played around with creating a browser-side importer (ie, creating a separate extension to pull the article text directly from the html and using the LingQ API to create a lesson). This works well enough, but it’s clunky to have two separate LingQ extensions.

I see that the real LingQ extension has some
special handling for Netflix; I wonder if you’d consider this for others sites too, like Le Monde?

The code is pretty trivial, you can see the article scraping here:
https://github.com/akamgm/LingQMonde/blob/main/scripts/content.js

Thanks!

Thanks, we’ll see if there is anything we can do.

@akamgm – can you make the extension public? I am having the exact same problem as you, I am subscribed to Le Monde and love it, however, I am now wasting my LingQ account since I never use it and instead manually translate articles as it’s too much hassle to copy-paste them into LingQ. Thanks!

@alisadubik it looks like it should be quite easy to add an extension to the chrome browser How to Install a Chrome Extension in Developer Mode
However, it didn’t work for me (sometimes there was an error in finding the text block (null exception, the block to extract the text from is hard-coded ‘section.article__wrapper’), even in absence of error the content did get imported into my lingq.
@akamgm Thank you very much for putting the code. I was wondering if there are other steps one should do to make the extension work?

Hi @alisadubik - sorry for the delay; been a busy week. Yes, I can work on packaging up the extension and publishing it in the Chrome store. I’ll post the link here in a few days when I have it done.

Hi @alexanderbondarenko1 - sorry that it didn’t work for you. Can you send me a link to the articled that failed? I’ll debug the problem.

thank you so so much!

fyi, I packaged up the extension and uploaded it to the Chrome store; it’s awaiting review before it gets published. I’ll post a link when it’s available.

@akamgm
Sorry for late reply! It seems that you’ve already fixed everything :slight_smile: Thank you very much for making the code public. The extension works perfectly.

Hi Alisa, finally this is available on the Chrome webstore. Apologies for the delay - I was traveling for work, which slowed down some revisions.

That said, I’ve kinda given up on LingQ after spending another weekend trying to hack around problems (this time in ebook support). Readlang seems to work much better for my needs, including Le Monde.

If it’s helpful: I made some minor updates to make the formatting a bit nicer. It’s also now published on the chrome webstore (link in a comment below).