Skip to content

repeating/secreepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secreepy

Secreepy is a Python library for web scrapping. It's crafted to make it easy to parse webpages using web drivers or simple get requests, and smoothly handle errors that could appear during the scrapping process.

How to Install

Installing Secreepy is straightforward; you can install it using pip, a package installer for Python.

pip install secreepy

Getting Started

from secreepy import Html, UndetectedChromeDriver, FirefoxDriver

# Choose the method you want
web = UndetectedChromeDriver(timeout=10, headless=False, verbos=1)
# web = FirefoxDriver(timeout=10, headless=False)
# web = Html()

# get the webpage
web.get('https://simple.wikipedia.org/wiki/List_of_countries')

# find all needed web elements using xpath
xpath = '//div[@class="mw-parser-output"]//p/span/following-sibling::a'
elements = web.find_elements_by_xpath(xpath)

# print all countries from the WikiPedia page
for element in elements:
    print(element.text)

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.