Skip to main content

wikiHowUnofficialAPI

wikiHowUnofficilAPI aims to provide a Python-based interface to extract useful information from wikiHow articles such as article summary, steps, images, etc. in an easy-to-use way.

Installation

pip install wikiHowUnofficialAPI

Usage

Random HowTo

Learn random stuff! Retuns a random WikiHow article URL.

import wikihowunofficialapi as wha

ra = wha.random_article()
print(ra)

Article Details

Uses the article URL to return various details about an article. In addition, it returns whether an article is written by an expert or not.

import wikihowunofficialapi as wha

article = wha.Article('https://www.wikihow.com/Train-a-Dog')

print(article.url)					# Print Article's URL
print(article.title)					# Print Article's Title
print(article.intro)					# Print Article's Introduction
print(article.n_methods)				# Print number of methods in an Article
print(article.methods)					# Print a list of methods in an Article
print(article.num_votes)				# Print number of votes given to an Article
print(article.percent_helpful)				# Print percentage of helpful votes given to an Article
print(article.is_expert)				# Print True if the Article is written by an expert
print(article.last_updated)				# Print date when the Article was last updated
print(article.views)					# Print the number of views recieved by Article
print(article.co_authors)				# Print the number of co-authors of an Article
print(article.references)				# Print the number of references in an Article
print(article.summary)					# Print Article's summary
print(article.warnings)					# Print Article's warnings
print(article.tips)					# Print Article's tips

first_method = article.methods[0]
first_step = first_method.steps[0]
print(first_step)					# Print Article's first step of the first method
print(first_step.title)					# Print the title of Article's first step of the first method
print(first_step.description)				# Print the description of Article's first step of the first method

Images

Retrieves a list of image included in a step as URLs.

import wikihowunofficialapi as wha

article = wha.Article('https://www.wikihow.com/Train-a-Dog')
print(article.methods[0].steps[0].picture)		# Print the URL of the image of Article's first step of the first method

Search

Searches WikiHow for the string and returns a list containing the title of the articles. The default max results is 10, but this can be changed.

import wikihowunofficialapi as wha

max_results = 1
how_tos = wha.search_wikihow("sleep", max_results)
print(how_tos[0])

Release files for wikihowunofficialapi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for wikihowunofficialapi 0.1.1
File Interpreter ABI Platform
wikihowunofficialapi-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / wikihowunofficialapi-0.1.1-py3-none-any.whl

Download URL wikihowunofficialapi-0.1.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b57205f114cc6b428f425da8a24ed9a9f4108204d4f0c16b97e1b4f13bfaccfb
BLAKE2b-256 checksum
How to use checksums
84761671eb8a56761589b78e5b261eb09a521a041cc257719fb78ce17636a3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page