예제 #1
0
 def resolve_links(self, info):
     html = pagehtml(self.url)
     soup = BeautifulSoup(html, 'lxml')
     links = get_links(self.url, soup)
     links = [[link['Text'], link['Url']] for link in links]
     return links
예제 #2
0
 def resolve_summary_subjectivity(self, info):
     DBG("resolve_summary_subjectivity")
     html = pagehtml(self.url)
     summary = get_sumy(3, html, self.url)
     blob = TextBlob(summary)
     return blob.sentiment.subjectivity
예제 #3
0
 def resolve_html(self, info):
     DBG("Resolving HTML.")
     html = pagehtml(self.url)
     DBG(f'HTML length: {len(html)}')
     return html
예제 #4
0
 def resolve_summary(self, info):
     DBG("Resolving summary.")
     html = pagehtml(self.url)
     summary = get_sumy(3, html, self.url)
     return summary