Index

KeyNotFound

When not satisfied with just returnning null.

Tasks

task pool

avatarUrl()

Parse columnInfo or creator for avatar url.

checkTasks()

Check tasks, return a tuple of [Unfinished, Failed] tasks.

column()

Return full column url.

comments()

Return url of comments of a single post.

content()

Extract post content.

contentImage()

Parse post content for image urls.

contents()

Map content(post) over posts.

fetchAvatarFiles()

Non blocking.

fetchColumnInfo()

Returns column info json string.

fetchComments()

Fetch comments json files, named `POST_SLUG_comments.

fetchContentImages()

Return a list of [exitCode, failedUrl].

fetchFile()

Fetch file via wget, non blocking.

fetchFileSync()

Like fetchFile() but blocking.

fetchPosts()

Returns a json string and saves to COLUMN_NAME_posts.json.

fetchTitleImages()

Fetch title images, non blocking.

getColumn()

Non ascii characters are always 16 bit encoded, e.g.

getComments()

Returns comments json string of a single post.

getContent()

Given a Uri, get Response content, following one direct.

getJsonValue()

Returns JsonObject[key] else null.

getPosts()

Get posts belong to a column, including post content, without comments.

parseColumnInfo()

Parse columninfo json string for postsCount, urls of avatar and creatorAvatar.

posts()

Return posts url.

postsCount()

Given a column info, returns postsCount.

run()

Run the module io.github.weakish.zhihu.

slug()

Zhihu uses Integer for post slug.

slugs()

Map slug(post) over posts.

titleImageUrl()

titleImage may be an empty string (““).

titleImagesUrls()

Skip posts which can not be parsed as JsonObject, or does not contain title Image.

urlify()

Urlify images hosted by zhihu CDN.

writeFile()

Write a String to a filePath, if filePath already exist, write to filePath_SHA256