Skip to content

Commit

Permalink
replaced http with https urls
Browse files Browse the repository at this point in the history
  • Loading branch information
mundanevision20 authored and radomirbosak committed Sep 13, 2022
1 parent 1b08a44 commit cf7da21
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duden [![Build Status](https://travis-ci.org/radomirbosak/duden.svg?branch=master)](https://travis-ci.org/radomirbosak/duden) [![Version](http://img.shields.io/pypi/v/duden.svg?style=flat)](https://pypi.python.org/pypi/duden/)

**duden** is a CLI-based program and python module, which can provide various information about given german word. The provided data are parsed from german dictionary [duden.de](http://duden.de).
**duden** is a CLI-based program and python module, which can provide various information about given german word. The provided data are parsed from german dictionary [duden.de](https://duden.de).

![duden screenshot](screenshot.png)

Expand Down
2 changes: 1 addition & 1 deletion duden/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
The duden package can parse the http://www.duden.de/ word information.
The duden package can parse the https://www.duden.de/ word information.
The `get` function is used to return parsed word, when provided with the word's
exact url name. The `search` function is used to search for words, either
Expand Down
6 changes: 3 additions & 3 deletions duden/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from .common import clear_text


URL_FORM = 'http://www.duden.de/rechtschreibung/{word}'
SEARCH_URL_FORM = 'http://www.duden.de/suchen/dudenonline/{word}'
URL_FORM = 'https://www.duden.de/rechtschreibung/{word}'
SEARCH_URL_FORM = 'https://www.duden.de/suchen/dudenonline/{word}'


def sanitize_word(word):
Expand Down Expand Up @@ -102,7 +102,7 @@ def get_word_of_the_day():
"""
Scrapes the word of the day and returns DudenWord instance of it.
"""
html_content = requests.get("http://www.duden.de").content
html_content = requests.get("https://www.duden.de").content
soup = bs4.BeautifulSoup(html_content, "html.parser")
link = soup.find("a", class_="scene__title-link").get("href")
word = link.split("/")[-1] # get word from "/rechtschreibung/word"
Expand Down
2 changes: 1 addition & 1 deletion duden/word.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DudenWord():
Example:
> r = requests.get('http://www.duden.de/rechtschreibung/Hase')
> r = requests.get('https://www.duden.de/rechtschreibung/Hase')
> soup = bs4.BeautifulSoup(r.text)
> word = duden.DudenWord(soup)
> word
Expand Down

0 comments on commit cf7da21

Please sign in to comment.