Commit d2692ff0 by Chris Johnson
parents 5e59416d 76972653
Showing with 6 additions and 3 deletions
......@@ -289,7 +289,7 @@ class Article:
Given a wikihow article url, return the star rating
of the article
Input: url for a wikihow article
Input: soup object for a wikihow article
Returns: float representing star rating
"""
rate = soup.find_all("div", class_ = "sp_helpful_icon_star")[:5]
......@@ -302,11 +302,11 @@ class Article:
def find_languages(self, soup):
"""
Given a url for a wikihow article, return a list
Given a soup object for a wikihow article, return a list
containing the languages that it is available in
(not including english)
Input: url
Input: soup object
Returns: List of languages
"""
languages = soup.find_all("div", class_ = "language_link")
......@@ -321,6 +321,9 @@ class Article:
"""
Take all the steps and descriptions from a given
wikihow articles and lump into one large string
Input: soup object
Returns: String containing the text on the article
"""
title = soup.find("h1", id = "section_0").text
description = soup.find("div", class_ = "mf-section-0").text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment