Skip to content

Commit

Permalink
Removing the if name snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe2803 committed Jan 9, 2024
1 parent 514cd16 commit d136930
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions contentmap/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,3 @@ def build(self):
self.contents
)
self.db.commit()


if __name__ == "__main__":
from datetime import datetime

start = datetime.now()
contentmap = ContentMapCreator(contents=[
{"url": "https://adrianbeaumont.net", "content": "Hello world"}
])
contentmap.build()
12 changes: 0 additions & 12 deletions contentmap/sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,3 @@ async def fetch_content(self, session, url):
except aiohttp.ClientConnectionError as e:
logging.error(f"Error while fetching {url}: {e.__repr__}")
return None


if __name__ == "__main__":
from datetime import datetime

start = datetime.now()
contentmap = SitemapToContentDatabase("https://adrianbeaumont.net/sitemap-1.xml", concurrency=20)
contents = contentmap.load()
end = datetime.now()
print(end - start)
print(contents)

0 comments on commit d136930

Please sign in to comment.