Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit e7b2c9e

Browse files
committed
fix some typos
1 parent 6a9f07e commit e7b2c9e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/tutorial.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Parsing of the HTML source will be done using "HTMLement" which is integrated in
7878
# Set the title
7979
item.label = img.get("alt")
8080
81-
# Fetch the url to content
81+
# Fetch the url
8282
url = elem.find("div/a").get("href")
8383
8484
# This will set the callback that will be called when listitem is activated.
@@ -112,16 +112,16 @@ function that will return listitems, it will be registered as a :class:`Route<co
112112
item.art["thumb"] = elem.find(".//img").get("src")
113113
114114
# Set the duration of the video
115-
item.info["duration"] = elem.find("span/span/span").text
115+
item.info["duration"] = elem.find("span/span/span").text.strip()
116116
117117
# Set thel plot info
118-
item.info["plot"] = elem.find("p").text
118+
item.info["plot"] = elem.find("p").text.strip()
119119
120120
# Set view count
121121
views = elem.find("./div/span[@class='pm-video-attr-numbers']/small").text
122122
item.info["count"] = views.split(" ", 1)[0].strip()
123123
124-
# Set date of video
124+
# Set the date that the video was published
125125
date = elem.find(".//time[@datetime]").get("datetime")
126126
date = date.split("T", 1)[0]
127127
item.info.date(date, "%Y-%m-%d") # 2018-10-19
@@ -147,9 +147,9 @@ function that will return listitems, it will be registered as a :class:`Route<co
147147
if next_tag is not None:
148148
# Find all page links
149149
next_tag = next_tag.findall("li/a")
150-
# Reverse list if links so the next page should be the first item
150+
# Reverse list of links so the next page link should be the first item
151151
next_tag.reverse()
152-
# Atempt to find the next page link with the text of '>>'
152+
# Attempt to find the next page link with the text of '>>'
153153
for node in next_tag:
154154
if node.text == u"\xbb":
155155
yield Listitem.next_page(url=node.get("href"), callback=video_list)

0 commit comments

Comments
 (0)