-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
305 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from pywikihow import HowTo | ||
|
||
how_to = HowTo("https://www.wikihow.com/Train-a-Dog") | ||
|
||
data = how_to.as_dict() | ||
|
||
print(how_to.url) | ||
print(how_to.title) | ||
print(how_to.n_steps) | ||
print(how_to.summary) | ||
|
||
first_step = how_to.steps[0] | ||
first_step.print() | ||
data = first_step.as_dict() | ||
|
||
how_to.print(extended=True) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from pywikihow import RandomHowTo | ||
|
||
how_to = RandomHowTo() | ||
how_to.print() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pywikihow import WikiHow, search_wikihow | ||
|
||
|
||
max_results = 1 # default for optional argument is 10 | ||
how_tos = search_wikihow("how to learn programming", max_results) | ||
assert len(how_tos) == 1 | ||
how_tos[0].print() | ||
|
||
|
||
# for efficiency and to get unlimited entries, the best is to use the generator | ||
for how_to in WikiHow.search("how to learn python"): | ||
how_to.print() |
Oops, something went wrong.