Skip to main content

Unofficial GuteFrage api. Check https://github.com/DAMcraft/gutefrage/wiki on how to use it

Project description

Logo

PyPI PyPI - License Replit

An unofficial gutefrage.net API made for Python.

Features

  • get question by name/url/id
  • get newest questions
  • like questions
  • reply to questions
  • TODO: post questions
  • TODO: reply replies

Get started

An short explenation of the basic features. You can find the full documentation here

Installation

Gutefrage API can be installed like every other python package: pip install gutefrage

Basic usage

In this example we are going to mark a question from gutefrage.net as liked. First we have to create a new client with username and password:

import gutefrage as gf

gfclient = gf.gutefrage("username", "password")

To interact with an specific question we need its id. To get the id we need its stripped_title. The stripped_title can be found in the last part of its url called like this:

The Url: https://www.gutefrage.net/frage/wie-berechnet-man-die-quadratwurzel-aus-625

stripped_title: wie-berechnet-man-die-quadratwurzel-aus-625

To get the questions id we can use .convert_to_id(string):

title = "wie-berechnet-man-die-quadratwurzel-aus-625"

id = gfclient.convert_to_id(title)
print(id)

What now is printed in the console is the question's id! For this question it's 57753709. Now we have the id we can get the question by id:

id = 57753709 
question = gf.question(id)

Now we've got the question, we can get lot of information about it:

information = question.info()

And we can finally give it a like!

question.like

Documentation

You can find the full documentation here

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

gutefrage-0.6.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

gutefrage-0.6.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file gutefrage-0.6.1.tar.gz.

File metadata

  • Download URL: gutefrage-0.6.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for gutefrage-0.6.1.tar.gz
Algorithm Hash digest
SHA256 7cbb02a463dc298cfbb8d38334791421fa7f51cff6f084d13bfeb1874631f607
MD5 d30ee0cbb13c4047ba988266b5759bdd
BLAKE2b-256 168d86a82d16ded2054a2b5cbadd2328ee9a406b526cbee7c3ce7a53097c0088

See more details on using hashes here.

File details

Details for the file gutefrage-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: gutefrage-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for gutefrage-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2b4d41f7856a74581b2104de173755a6b6991ee4b6a504d81ad870c67eac533
MD5 4356e687ffade13ea47f97e2834d40d6
BLAKE2b-256 7ba964e42e94fe7cc274519cb3f329c324a7368028c9c24999cb33d926291e31

See more details on using hashes here.

Supported by

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