KinjaExtractor - An ‘easy’ way to back-up your posts

Kinja'd!!! "BvdV - The Dutch Engineer" (dutchengineer)
11/06/2019 at 12:30 • Filed to: Oppocalipse, Rescue Plan

Kinja'd!!!8 Kinja'd!!! 23

Whether oppo will move or will stay, it can never hurt to back-up!

After reading the post below , and the python backup option, I thought I could maybe create and executable based on it, mainly as a bit of a challenge to myself, but also to help Oppo.

!!! UNKNOWN CONTENT TYPE !!!

So based Just Jeepin’s code, I made some small adaptions and made an executable out of it, such that it is a bit easier to use (current version still requires command line, but the commands are included in the readme, if people want it I guess I could make a simple GUI). Kinjaextractor.zip with the .exe and the readme can be downloaded here:

!!! UNKNOWN CONTENT TYPE !!!

Just click on the download button, and place the .exe file where you want to back up your posts.

A new feature of this executable is that it can also export only certain posts, by including their URLs in a .txt-file. When you have a mix of shitposts and longreads that help to make a bit of a selection. It’s still possible to save all files though.

Let me know if you have any problems/issues with it, or need a more extensive instruction, then I can support and improve the function.

Disclaimer: this code is experimental, and might cause problems, so please run it with caution. If you want to stop the code in Command Line type Ctrl+C


DISCUSSION (23)


Kinja'd!!! Chinny Raccoon > BvdV - The Dutch Engineer
11/06/2019 at 12:37

Kinja'd!!!0

I know I said I would give this a go yesterday, but I fell asleep on the sofa instead. Still recovering from last week...


Kinja'd!!! BvdV - The Dutch Engineer > Chinny Raccoon
11/06/2019 at 12:41

Kinja'd!!!0

No problem! I thought I’d just share it here, and enlarge the test group a bit


Kinja'd!!! HammerheadFistpunch > BvdV - The Dutch Engineer
11/06/2019 at 14:00

Kinja'd!!!1

oooh, excited to try this out when I get back to windows town.


Kinja'd!!! barnie > BvdV - The Dutch Engineer
11/06/2019 at 14:56

Kinja'd!!!0

Ok, i t pulled my one and only post. Th ank you!

Can this be used to pull all my replies to other posts?

FWIW, tried some of the args and got the following. No idea what is going on but might help you. Winders 10...

C:\Users\peyron\Documents\kinja>kinjaextractor.exe tlanarch —continue NEXT

NEXT

Traceback (most recent call last):

File “kinja.py”, line 316, in

File “kinja.py”, line 216, in main

File “urllib\request.py”, line 222, in urlopen

File “urllib\request.py”, line 531, in open

File “urllib\request.py”, line 641, in http_response

File “urllib\request.py”, line 569, in error

File “urllib\request.py”, line 503, in _call_chain

File “urllib\request.py”, line 649, in http_error_default

urllib.error.HTTPError: HTTP Error 404: Not Found

[15984] Failed to execute script kinja


Kinja'd!!! BvdV - The Dutch Engineer > barnie
11/06/2019 at 15:18

Kinja'd!!!0

That input is a legacy from the script I based it on. I’ll see if I can remove the issue


Kinja'd!!! Enginerrrrrrrrr > BvdV - The Dutch Engineer
11/06/2019 at 18:25

Kinja'd!!!1

I just downloaded a chrome extension and it makes it super easy ;)


Kinja'd!!! Urambo Tauro > Enginerrrrrrrrr
11/06/2019 at 19:25

Kinja'd!!!1

What’s i t called?


Kinja'd!!! philipilihp > BvdV - The Dutch Engineer
11/06/2019 at 22:53

Kinja'd!!!0

This is not mac compatible right...?


Kinja'd!!! BvdV - The Dutch Engineer > philipilihp
11/07/2019 at 03:40

Kinja'd!!!1

It sadly isn’t . However, the python version is, however I’m not knowledgable enough about mac to explain how to run it


Kinja'd!!! BvdV - The Dutch Engineer > philipilihp
11/07/2019 at 10:23

Kinja'd!!!1

This one is even nicer, and should probably work on mac as well

https://oppositelock.kinja.com/kinja-backup-pdfs-gotham-grabber-method-1839677826


Kinja'd!!! Matchthebox > BvdV - The Dutch Engineer
11/07/2019 at 20:55

Kinja'd!!!0

Just when I just did my first post in Oppo and this have to happened? :( Need to see about how to back up my post on Mac.


Kinja'd!!! Nauraushaun > BvdV - The Dutch Engineer
11/06/2020 at 17:58

Kinja'd!!!1

I was able to run the python version, but more often than not it “fails to parse” pages. I think BeautifulSoup is doing the failing.


Kinja'd!!! If only EssExTee could be so grossly incandescent > BvdV - The Dutch Engineer
11/06/2020 at 18:04

Kinja'd!!!1

The exe just opens and immediately closes a command prompt window and also the readme file is missing


Kinja'd!!! Akio Ohtori - RIP Oppo > BvdV - The Dutch Engineer
11/06/2020 at 19:27

Kinja'd!!!1

Interesting. The part of GothamGrabber that still works is it exporting a list of all your posts. I don’t have time tonight, but I will try to look into combining the two tomorrow...


Kinja'd!!! BvdV - The Dutch Engineer > Nauraushaun
11/07/2020 at 09:00

Kinja'd!!!0

Sorry to hear it’s having difficulties. I must say Beautiful soup was playing up when I first used it last year  too. I’ll see if I can reproduce the error.


Kinja'd!!! BvdV - The Dutch Engineer > If only EssExTee could be so grossly incandescent
11/07/2020 at 09:01

Kinja'd!!!0

The first is the ‘correct’ behaviour, as you need to open in from the command line. The read me should be there (which has the information about how to run it), I’ll check in a bit.


Kinja'd!!! TheRealBicycleBuck > BvdV - The Dutch Engineer
11/07/2020 at 17:25

Kinja'd!!!0

Not working. Running from command prompt. Using Python 3.8.6. 


Kinja'd!!! Nauraushaun > BvdV - The Dutch Engineer
11/07/2020 at 18:42

Kinja'd!!!0

I’ve restored to a semi-manual approach instead :) 


Kinja'd!!! duurtlang > BvdV - The Dutch Engineer
11/08/2020 at 13:16

Kinja'd!!!0

So, for a novice who does know how to open the command line, what do I do?

kinjaextractor.exe duurtlang

Gets me:

Fetched: https://oppositelock.kinja.com/europpomeet-2019-date-set-week-16-location-final-rou-1830641928

Sorry, problems parsing https://oppositelock.kinja.com/europpomeet-2019-date-set-week-16-location-final-rou-1830641928, skipping

And on and on. It creates folders, but the folders remain empty. What should I enter, assuming I want all articles (in the .txt) with as much info as possible, like images.


Kinja'd!!! BvdV - The Dutch Engineer > duurtlang
11/08/2020 at 15:00

Kinja'd!!!0

Somehow the readme has not been included with the uploaded file.

Try again with this folder:

https://drive.google.com/drive/folders/1nd2miBnCGenqiRFss1FYv1bCEgi2hY6G?usp=sharing

you can place the urls of articles you want to save in the file articlelist.txt, as explained in the readme.txt

EDIT: I tried, and this doesn’t work either.... It seems like the structure of kinja changed making it impossible to rip the contents with this method at this point in time. There are other methods I think, but need to check


Kinja'd!!! CaptDale - is secretly British > BvdV - The Dutch Engineer
11/08/2020 at 18:41

Kinja'd!!!0

I just keep getting

“ Sorry, problems parsing https:... skipping”


Kinja'd!!! BvdV - The Dutch Engineer > CaptDale - is secretly British
11/09/2020 at 01:25

Kinja'd!!!1

Kinja seems to have changed in the meantime, working on a fix currently 


Kinja'd!!! CaptDale - is secretly British > BvdV - The Dutch Engineer
11/10/2020 at 13:27

Kinja'd!!!0

Let me know if you have an update