pixelfed icon indicating copy to clipboard operation
pixelfed copied to clipboard

Instagram import and media.json file

Open binerf opened this issue 2 years ago • 13 comments

Hello,

I'm migrating from Instagram to Pixelfed but, after downloading data from Instagram (json type), I can't find any media.json file in the received zip.

Here content of zip file:

.
├── account_information
├── ads_and_businesses
├── ads_and_content
├── apps_and_websites
├── autofill_information
├── comments
├── comments_settings
├── contacts
├── content
├── device_information
├── events
├── followers_and_following
├── fundraisers
├── guides
├── information_about_you
├── likes
├── login_and_account_creation
├── loyalty_accounts
├── media
├── messages
├── monetization
├── past_instagram_insights
├── recent_searches
├── reports
├── saved
├── shopping
├── story_sticker_interactions
└── your_topics

28 directories, 0 files

Did I miss something ?

binerf avatar Aug 12 '21 17:08 binerf

Ok seems that Instagram closed media.json file possibility... https://www.blackhatworld.com/seo/instagram-closing-down-its-api-media-json-file.1020608/

If anyone knows how to import data from Instagram to Pixelfed and not picture by picture ;-) I'm interested. Thanks

binerf avatar Aug 31 '21 17:08 binerf

@binerf, why are you closing this issue? Problem persists, Pixelfed users are misguided. Pixelfed should solve that some way: either remove non-working function, either adapt it to work.

cloo avatar Sep 25 '21 19:09 cloo

Actually, I closed my ticket as I got an answer from Reddit where I discovered that problem was due to Instagram export, not, IMHO due to Pixelfed. Nevertheless, I agree that it would be a nice feature to implement in Pixelfed, an IG import based on the new IG export format.

binerf avatar Sep 27 '21 15:09 binerf

Of couse it is Instagram's fault :) But it does not matter why it rains, it still makes sense using umbrella. Pixelfed simply should not show buttons which do not work, no matter who's fault.

cloo avatar Sep 27 '21 15:09 cloo

I re-open it and let dev team close it if they consider it should be closed.

binerf avatar Sep 27 '21 15:09 binerf

Seems like there was already a PR to fix it but it got closed: https://github.com/pixelfed/pixelfed/pull/2751

I manually changed my post.json after the changes which the mentioned PR does and could import some pictures. Unfortunately it only found 20 of my more than 300 Instagram Posts - so its not really working great...

CMiksche avatar Jan 18 '22 01:01 CMiksche

I think this is related to the fact, that instagram exports now contain images in .webp format which is not supported by pixelfed. We could convert them before importing...

bahuma20 avatar Apr 27 '22 10:04 bahuma20

I have some users that would like to switch to pixelfed from instagram, but they don't want to lose their post history. What would be the correct way of implementing https://github.com/pixelfed/pixelfed/pull/2751 and can the community help with this?

Zir0h avatar Sep 27 '22 11:09 Zir0h

@dansup can we get an update? With the Pixelfed apps coming along I suspect this issue will only cause more confusion, especially with:

  • #3830

davetapley avatar Dec 16 '22 12:12 davetapley

I am having exact the same issue. Currently in the stage to move from instagram to my own pixelfed instance. Would be great to be able to migrate my approx 5000 pictures (since 2012).

MichaelMrak avatar Dec 22 '22 12:12 MichaelMrak

Managed to get it to import all most of my posts after a little messing with the zip

  • unzip the instagram export
  • convert all photos into png (jpeg might also work)
    • i used mogrify from imagemagick, https://imagemagick.org/script/mogrify.php
      • mogrify -format png media/posts/*/*.webp
      • mogrify -format png media/posts/*/*.heic
  • Edit replace all webp and heic in content/posts_1.json with png
  • zip the files back up and import that

DavidMakin avatar Aug 01 '23 14:08 DavidMakin

Managed to get it to import all most of my posts after a little messing with the zip

* unzip the instagram export

* convert all photos into png (jpeg might also work)
  
  * i used mogrify from imagemagick, https://imagemagick.org/script/mogrify.php
    
    * mogrify -format png media/posts/_/_.webp
    * mogrify -format png media/posts/_/_.heic

* Edit replace all webp and heic in `content/posts_1.json` with png

* zip the files back up and import that

can confirm. my import broke at the point where webp started to be used. I had extracted zip, converted webp into png, edited json file, zipped back and it all came through without problem.

rzlatic avatar Nov 12 '23 15:11 rzlatic

Managed to get it to import all most of my posts after a little messing with the zip

  • unzip the instagram export

  • convert all photos into png (jpeg might also work)

    • i used mogrify from imagemagick, https://imagemagick.org/script/mogrify.php

      • mogrify -format png media/posts//.webp
      • mogrify -format png media/posts//.heic
  • Edit replace all webp and heic in content/posts_1.json with png

  • zip the files back up and import that

I just did this but instead had to convert the files to webp files that were in jfif format to webp, then convert them to jpg. After making the necessary edits in the content/posts_1.json to all be .jpg and re-compressing the directory, I can successfully upload the zip archive to pixelfed but still no posts are shown that I can select to import.

If we can figure this out I would be happy to create a simple shell script tool to automate this process for people as an intermediate solution until this gets somehow solved by pixelfed.

promitheas17j avatar Apr 08 '24 14:04 promitheas17j