Comments (6)
I guess, no, as I didn't find it on: http://www.livejournal.com/doc/server/ljp.csp.xml-rpc.protocol.html
This is a official XML RPC protocol of LiveJournal. Obviously it will never have archive function (if you mean "dump to disk" function). LJServer is a wrapper for this interface. BTW take a look at backup script at backup.py. I guess it should be rewritten with better option for serialization.
- It's written in python2.
We don't support python 3 for now. But this a great suggestion.
from python-lj.
@daniilr
I can port it to python3. Do you mind?
I would drop python2 support, because it's legacy and it's python2-python3 code is unidiomatic.
from python-lj.
Would be great. I am working to write unittests now
from python-lj.
from python-lj.
I don't know where else to post this - so I am putting it here:
def datetime_from_string(s):
"""This assumes input in the form '2007-11-19 12:24:01' because that's all I care about"""
if(s):
date_s = s.split(' ')
print(date_s)
year_s, month_s, day_s = date_s[0].split('-')
hour_s, min_s, sec_s = date_s[1].split(':')
return datetime.datetime(int(year_s), int(month_s), int(day_s), int(hour_s), int(min_s), int(sec_s))
# Fallback: Y2K
return datetime.datetime(2000,1,1,0,0,0,0)
I encountered NoneType often and this corrected it.
Also, keywords all and id are Python keywords, switch them to all_ and id_ or select a new variable name; they were found in many of the functions in backup.py
from python-lj.
@markfortma
Changed it to:
return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S")
I think strptime
is the best approach here. Who needs manual parsing? :)
from python-lj.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-lj.