MCPcopy Create free account
hub / github.com/clockworknowledge/menome_processor / extract_publisher

Function extract_publisher

app/routers/document.py:52–59  ·  view source on GitHub ↗
(soup: BeautifulSoup, url: str)

Source from the content-addressed store, hash-verified

50
51
52def extract_publisher(soup: BeautifulSoup, url: str) -> str:
53 publisher = soup.find('meta', property='og:site_name')
54 if publisher and publisher.get('content'):
55 return publisher['content']
56 domain = urlparse(url).netloc
57 if domain:
58 return domain.replace("www.", "")
59 return ''
60
61def extract_full_text(soup: BeautifulSoup) -> str:
62 # Remove unwanted tags:

Callers 1

add_documentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected