mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
19 lines
382 B
Python
19 lines
382 B
Python
import json
|
|
|
|
def split_data(data):
|
|
p_json = json.loads(data)
|
|
|
|
count = p_json["count"]
|
|
posts = p_json["data"]
|
|
query = p_json["query"]
|
|
success = p_json["success"]
|
|
|
|
return count, posts, query, success
|
|
|
|
def format_data(data):
|
|
post_titles = [post["title"] for post in data]
|
|
post_links = [post["url"] for post in data]
|
|
|
|
return post_titles, post_links
|
|
|