File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class TechCrunch:
15
15
"""
16
16
17
17
def getArticles (self , category ):
18
- self . category = category
18
+
19
19
"""
20
20
Class - `TechCrunch`
21
21
Example:
@@ -34,7 +34,7 @@ def getArticles(self, category):
34
34
}
35
35
"""
36
36
url = (
37
- "https://techcrunch.com/category/" + self . category .replace (" " , "-" ).lower ()
37
+ "https://techcrunch.com/category/" + category .replace (" " , "-" ).lower ()
38
38
)
39
39
try :
40
40
res = requests .get (url )
@@ -100,7 +100,7 @@ def getArticles(self, category):
100
100
return ejson
101
101
102
102
def search (self , topic ):
103
- self . topic = topic
103
+
104
104
"""
105
105
Class - `TechCrunch`
106
106
Example:
@@ -118,7 +118,7 @@ def search(self, topic):
118
118
"link": Link to the article
119
119
}
120
120
"""
121
- url = "https://search.techcrunch.com/search?p=" + self . topic + "&fr=techcrunch"
121
+ url = "https://search.techcrunch.com/search?p=" + topic + "&fr=techcrunch"
122
122
try :
123
123
res = requests .get (url )
124
124
soup = BeautifulSoup (res .text , "html.parser" )
You can’t perform that action at this time.
0 commit comments