Skip to main content

Boilerplate for developing crawler with Selenium.

Project description

Selenium Crawler Template

Boilerplate for developing crawler with Selenium.

Installation

pip install selenium-crawler-template

Usage

from selenium_crawler_template import Crawler

class MyCrawler(Crawler):
    @Crawler.open_url_in_new_tab
    def _get_email_from_profile(self, _):
        return self.find_element('a#email').get_attribute('href')

    def crawl(self, **kwargs):
        self.driver.get(kwargs['url'])

        for profile in self.find_elements('ul > .profile'):
            _ = self._get_email_from_profile(profile.get_attribute('href'))

        self._scroll_to_bottom()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selenium-crawler-template-0.3.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

selenium_crawler_template-0.3.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file selenium-crawler-template-0.3.1.tar.gz.

File metadata

  • Download URL: selenium-crawler-template-0.3.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for selenium-crawler-template-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c94e72b85807e4efba12c3d52d50b2613e69960e7c89b4547d8c54db52c5f8e8
MD5 bfe2f6e35a6419ad33b22df893908d2b
BLAKE2b-256 72fd4d3678e93ab3710ad8e864383fc77038328d6b9a10f7088415c8093dab8b

See more details on using hashes here.

File details

Details for the file selenium_crawler_template-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: selenium_crawler_template-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for selenium_crawler_template-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2da6fc4a93e68c4f9e1be75ad145e3c832ccecfc80111f8af26acde57d05840
MD5 8533f480f7a8eb8bf68bd01695864919
BLAKE2b-256 9d49af25c712201bfc343b5e3c53315092c9d4df44dadd2453e825f643a9b1bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page