MCPcopy
hub / github.com/scholarly-python-package/scholarly / _get_soup

Method _get_soup

scholarly/_navigator.py:237–246  ·  view source on GitHub ↗

Return the BeautifulSoup for a page on scholar.google.com

(self, url: str)

Source from the content-addressed store, hash-verified

235 return any([got_id(i) for i in _CAPTCHA_IDS])
236
237 def _get_soup(self, url: str) -> BeautifulSoup:
238 """Return the BeautifulSoup for a page on scholar.google.com"""
239 html = self._get_page('https://scholar.google.com{0}'.format(url))
240 html = html.replace(u'\xa0', u' ')
241 res = BeautifulSoup(html, 'html.parser')
242 try:
243 self.publib = res.find('div', id='gs_res_glb').get('data-sva')
244 except Exception:
245 pass
246 return res
247
248 def search_authors(self, url: str)->Author:
249 """Generator that returns Author objects from the author search page"""

Callers 14

search_authorsMethod · 0.95
search_publicationMethod · 0.95
search_organizationMethod · 0.95
_load_urlMethod · 0.80
fillMethod · 0.80
_get_bibtexMethod · 0.80
_fill_public_accessMethod · 0.80
_fill_publicationsMethod · 0.80
_get_coauthors_longMethod · 0.80
fillMethod · 0.80
download_mandates_csvMethod · 0.80

Calls 1

_get_pageMethod · 0.95

Tested by

no test coverage detected