Package: wikihowapi-pk
wikihowAPI_pkwikihowAPI_pk is basically base onvigilant-umbrella/wikiHowUnofficialAPIbut add more parser on it.New featuresReturn map(json) format for server useVideo Parser in Method section: each method is either one picture or videoIngredients parserVideo Parser in section: some page would have videos after method sectionParse the search page of wikihowParer to show more tippsInstallationpipinstallwikiHowUnofficialAPI,wikihowAPI-pkUsageRandom HowToLearn random stuff! Retuns a random WikiHow article URL.importwikihowunofficialapiaswhara=wha.random_article()print(ra)Article DetailsUses the article URL to return various details about an article. In addition, it returns whether an article is written by an expert or not.importwikihowunofficialapiaswhaarticle=wha.Article('https://www.wikihow.com/Train-a-Dog')print(article.url)# Print Article's URLprint(article.title)# Print Article's Titleprint(article.intro)# Print Article's Introductionprint(article.n_methods)# Print number of methods in an Articleprint(article.methods)# Print a list of methods in an Articleprint(article.num_votes)# Print number of votes given to an Articleprint(article.percent_helpful)# Print percentage of helpful votes given to an Articleprint(article.is_expert)# Print True if the Article is written by an expertprint(article.last_updated)# Print date when the Article was last updatedprint(article.views)# Print the number of views recieved by Articleprint(article.co_authors)# Print the number of co-authors of an Articleprint(article.references)# Print the number of references in an Articleprint(article.summary)# Print Article's summaryprint(article.warnings)# Print Article's warningsprint(article.tips)# Print Article's tipsfirst_method=article.methods[0]first_step=first_method.steps[0]print(first_step)# Print Article's first step of the first methodprint(first_step.title)# Print the title of Article's first step of the first methodprint(first_step.description)# Print the description of Article's first step of the first methodImagesRetrieves a list of image included in a step as URLs.importwikihowunofficialapiaswhaarticle=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 methodSearchSearches 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.importwikihowunofficialapiaswhamax_results=1how_tos=wha.search_wikihow("sleep",max_results)print(how_tos[0])Parse for wiki search pageimportwikihowunofficialapiaswhahow_tos:list=wha.search_wikihow_link("housing bubble")returnJsonResponse({"results":how_tos})Output:{"results":[{"url":"https://www.wikihow.com/Make-Bubble-Solution","img_url":"https://www.wikihow.com/images/thumb/8/8b/Make-Bubble-Solution-Step-10-Version-9.jpg/-crop-250-145-250px-Make-Bubble-Solution-Step-10-Version-9.jpg","title":"How to Make a Homemade Bubble Mixture (With and Without Glycerin)","update":"Updated 5 months ago","views":"1,692,651 views","sp_verif":"Quality Tested"},{"url":"https://www.wikihow.com/Draw-Bubble-Letters","img_url":"https://www.wikihow.com/images/thumb/6/65/Draw-Bubble-Letters-Step-5-Version-5.jpg/-crop-250-145-250px-Draw-Bubble-Letters-Step-5-Version-5.jpg","title":"How to Draw Bubble Letters","update":"Updated 2 months ago","views":"2,269,250 views","sp_verif":"Quality Tested"}]}Json as ouputThe fields in map are basically the same asArticle Detailsimportwikihowunofficialapiaswhaarticle=wha.Article('https://www.wikihow.com/Train-a-Dog')article_json:Map=article.get()Output:{"url":"https://www.wikihow.com/Make-Homemade-Spaghetti-Sauce","title":"How to Make Homemade Spaghetti Sauce","intro":"If you want to control the flavors and ingredients in spaghetti sauce, create your own! For a quick tomato and olive oil sauce that tastes fresh, simmer canned tomatoes in garlic, olive oil, and fresh basil. You can also make a meat spaghetti sauce that uses classic herbs and cooks until the meat is tender. Marinara sauce is also easy to make at a moment's notice. Just sauté a little onion and garlic in olive oil before you add red wine and tomatoes. Then cook the sauce until the tomatoes soften and lose their shape.","ingredients":[{"recipe_name":"Quick Tomato and Olive Oil Sauce","recipe_stuff":["\n6 cloves garlic","\n8 tablespoons (120 ml) extra-virgin olive oil, divided","\n1 28-ounce (794 g) can of whole plum tomatoes packed in tomato juice","\nSalt and pepper to taste","\n10 basil leaves"]}],"n_methods":3,"methods":[{"method_number":1,"title":"Quick Tomato and Olive Oil Sauce","steps":[{"number":1,"title":"Crush 6 cloves of garlic","description":"Peel 6 cloves of garlic and set them on a cutting board. Use the flat blade of a chef's knife to press down firmly on each clove of garlic.\nThe pressure will crush the garlic and release flavor.","picture":"https://www.wikihow.com/images/thumb/a/aa/Make-Homemade-Spaghetti-Sauce-Step-1-Version-6.jpg/v4-460px-Make-Homemade-Spaghetti-Sauce-Step-1-Version-6.jpg"},{"number":2,"title":"Sauté the garlic in olive oil for 2 to 3 minutes.","description":"Put the crushed garlic into a non-reactive saucepan and pour in 5 tablespoons (74 ml) of the extra-virgin olive oil. Turn the burner to medium and heat the garlic until it becomes golden brown.\nStir the garlic occasionally so it cooks evenly.","picture":"https://www.wikihow.com/video/c/cd/Make Homemade Spaghetti Sauce Step 2 Version 5.360p.mp4"}]},{"method_number":2,"title":"Classic Spaghetti Sauce with Meat","steps":[{"number":1,"title":"Cook the ground beef, onion, and garlic over medium heat for 7 to 8 minutes.","description":"Pour 2 tablespoons (30 ml) of olive oil into a large skillet or Dutch oven and turn the burner to medium. Stir in 1 pound (450 g) of lean ground beef, 1 cup (150 g) of diced yellow onion, and 2 teaspoons (6 g) of minced garlic. Stir and cook the meat mixture until the beef is browned and crumbly.\nSince you're using lean ground beef, there shouldn't be much grease to drain off. If the meat is very greasy, drain off excess grease before finishing the sauce.","picture":"https://www.wikihow.com/video/3/30/Make Homemade Spaghetti Sauce Step 8 Version 5.360p.mp4"},{"number":2,"title":"Add the tomato paste, basil, oregano, thyme, fennel, and optional crushed pepper.","description":"Scoop 6 ounces (170 g) of tomato paste into the skillet and add the herbs. Stir well to combine the ingredients and cook the sauce over medium heat for 1 to 2 minutes. Add salt and pepper to taste.","picture":"https://www.wikihow.com/video/0/00/Make Homemade Spaghetti Sauce Step 9 Version 5.360p.mp4"}]}],"video":"https://www.youtube.com/embed/r1maSAsVGaY?enablejsapi=1","num_votes":11,"percent_helpful":84,"is_expert":true,"last_updated":"2023-01-17T00:00:00","views":1360757,"co_authors":56,"references":18,"summary":"To make classic homemade spaghetti sauce with meat, start by browning the ground beef, onion, and garlic over medium heat for 7-8 minutes. Next, add the tomato paste and spices and cook the sauce for 2 minutes. Then, add the crushed tomatoes, broth, and sugar and simmer the sauce for 30 minutes. Remove the sauce from heat, spoon it over cooked pasta, and enjoy! For tips on making a quick marinara sauce, read on!","warnings":[],"tips":["Try doubling or tripling a batch of spaghetti sauce. Store it in an airtight container and freeze it for up to 6 months.\n"]}CreditMost of the codes are base onvigilant-umbrella/wikiHowUnofficialAPI