Metadata-Version: 2.1
Name: wordreference-scraper
Version: 0.1.0
Summary: Scraping words from wordreference.com
License: MIT
Author: Santiago Padron
Requires-Python: >=3.9,<4
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: beautifulsoup4 (>=4.11.1)
Requires-Dist: requests (>=2.28.1)
Description-Content-Type: text/markdown

# wordreference-scraper
Module for scraping words in Wordreference.com, from English to Spanish.

Multiple languages soon.

## Usage

'wordreference-scraper' is used to scrape words and its meanings from the online dictionary "Wordreference"

### One word

```python
from wordreference_scraper import WordreferenceScraper

words = ['get']

wordreference_scraper_instance = WordreferenceScraper(words)

scraped_words = wordreference_scraper.start()

print(scraped_words) 
# Dictionary where the keys are the forms of the word
# and the value is the html of all meanings of that word
```

### Multiple words

```python
from wordreference_scraper import WordreferenceScraper

words = ['puzzle', 'noise', 'pencil']

wordreference_scraper_instance = WordreferenceScraper(words)

scraped_words = wordreference_scraper.start()

print(scraped_words)

```
### Selecting sections
Wordreference has multiple sections where shows the multiple meanings of word, such as 'Principal translations', 'Additional translations', 'Verbal Locutions', and 'Compound Forms'. These are the keys and values for the dictionary of sections to scrape

- principal_translations - Boolean: Section for Principal Translations
- additional_translations - Boolean: Section for Additional Translations
- compound_forms - Boolean: Section for Compound Forms
- locuciones_verbales - Boolean: Section for "Locuciones Verbales"

```python
from wordreference_scraper import WordreferenceScraper

words = ['Absolute', 'Note', 'Self']

sections = {
    'principal_translations':True,
    'additional_translations':True,
    'compound_forms':False,
    'locuciones_verbales':False
}

wordreference_scraper_instance = WordreferenceScraper(words,sections)

scraped_words = wordreference_scraper.start()

print(scraped_words)
```

## Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

## License

`wordreference_scraper` was created by Santiago Padron. It is licensed under the terms of the MIT license.

## Credits

`wordreference_scraper` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).







