raineorshine / memrise-export

Export all words from a Memrise course to a CSV file
7 stars 3 forks source link

Mnemonics (mems) #2

Open raineorshine opened 3 years ago

raineorshine commented 3 years ago

This issue is created to discuss how to export mems.

Since there are multiple mems per learning item, they will not fit into a single column in the CSV. How should they be exported? Separate CSV with a foreign key?

API

Mems can be accessed with the following internal API:

https://app.memrise.com/api/mem/get_many_for_thing/?learnable_id=697677578498&_=1599688784139

Result:

{
  "mems": [
    {
        "id": 1416754,
        "text": "Looks like a guy \nrelaxing in a hot \ntub saying \"ahh....\"",
        "cre": "2013-06-07T18:16:50Z",
        "absolute_url": "/mem/1416754/looks-like-a-guy-relaxing-in-a-hot-tub-saying-ahh/",
        "rating": 93,
        "pinned": false,
        "image_original": "/s3_proxy/?f=uploads/mems/3348081000130607181552.jpg",
        "image_output_url": "https://static.memrise.com/uploads/mems/output/3348081-130607181650.png",
        "direction": null,
        "thing_id": 10645715,
        "column_a": 1,
        "column_b": 2,
        "learnable_id": 697677578498,
        "author_id": 3348081,
        "text_x_position": 2,
        "text_y_position": 2,
        "text_size": 28,
        "can_edit": false,
        "author":
        {
            "id": 3348081,
            "username": "ksager",
            "photo_small": "https://static.memrise.com/img/100sqf/from/uploads/profiles/ksager_130522_1336_46.jpg"
        }
    },
    ...
  ]
}
raineorshine commented 3 years ago

@AniruddhaHumane Would love to hear your thoughts

AniruddhaHumane commented 3 years ago

I was going through the link to the internal API that you shared. Apparently each mem has a rating. The rating depends upon the no of users who found a mem useful. Using this information, the easiest way is to export only that mem which has the highest rating.

The downside to this is that most rated mem may not help everyone. E.g., I sometimes find a mem that helps me remember an item after browsing its 2-3 mems first. I liked your foreign key idea in this case. There's are some keys in the JSON called thing_id or learnable_id. We try using one of these as a primary key and the mem id as a foreign key.

raineorshine commented 3 years ago

I liked your foreign key idea in this case. There's are some keys in the JSON called thing_id or learnable_id. We try using one of these as a primary key and the mem id as a foreign key.

Yes, I think that should work.

I'm working on other projects at the moment, but I'm open to PR's if anybody wants to tackle this. It will require some additional UI or an option for the user to opt-in to this feature.

WiliTest commented 3 years ago

You are trying to export the mems. But is it possible to import the mems in memrize (when we create a new course)?

raineorshine commented 3 years ago

You are trying to export the mems. But is it possible to import the mems in memrize (when we create a new course)?

No, memrise-export only supports exporting.

unhappymode commented 10 months ago

This issue is created to discuss how to export mems.

Hi! This is just a last minute attempt by me to get back mems, from a specific course. Have you managed to save them? Could you please let me know how I can download the mems from the course I was following?

raineorshine commented 10 months ago

@unhappymode Since Memrise does not have a public API, and the internal API that this extension used was removed two years ago, there's no easy way to download mems. It's probably possible to build a scraper to do it.