Includes beautifulsoup, requests, selenium, pathlib, lxml
739
This python script scans https://www.certara.com/sitemap_index.xml,
The config.json file in the root directory.
Site Map ThreadPoolExecutor Add/Subtract max_workers for Site Map ThreadPoolExecutor by updating the site_map_workers attribute of the json file.
"site_map_workers": 1,
URL ThreadPoolExecutor Add/Subtract max_workers for URL ThreadPoolExecutor by updating the link_workers attribute.
"link_workers": 20,
Manage Sitemaps Add/Remove sitemaps crawled on https://www.certara.com/sitemap_index.xml in the site_maps attribute.
"site_maps":[
"https://www.certara.com/post-sitemap1.xml",
"https://www.certara.com/post-sitemap2.xml",
"https://www.certara.com/post-sitemap3.xml",
"https://www.certara.com/page-sitemap.xml",
"https://www.certara.com/post_tag-sitemap.xml",
"https://www.certara.com/publications-sitemap.xml"
],
Exclude URLs from being crawled
Add/Remove paths for the scraper to ignore by updating the ignore_paths attribute of the json file.
"ignore_paths": [
"/brochure/",
"/case-study/",
"/white-paper/",
"/poster/",
"/wp/wp-admin/",
"/wp/wp-includes/js/jquery/jquery.js",
"/27554-2/",
"/4a-decision-framework/",
"/why-phoenix-nlme-is-the-best-in-class-solution-for-pop-pkpd/",
"/payment/"
],
python main.py
From https://github.com/testdrivenio/concurrent-web-scraping
docker run -v CHANGE_TO_LOCAL_DIRECTORY:/usr/src/scraper -it projectassistant/sitemap-scraper:chromedriver /bin/bash
cd /usr/src/app
python main.py
docker pull projectassistant/sitemap-scraper:latest