A
A
Aristarkh Deryapa2017-08-28 15:14:57
Python
Aristarkh Deryapa, 2017-08-28 15:14:57

Getting array from url, python?

Hello! From the link (example.com/forum/page/1) you need to get an array(["forum", "page", "1"]), but the problem is that this needs to be done when entering the page. Website in pure python.
PS Something like view is necessary. Or how is he...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maxfox, 2017-08-28
@isisTance

If you write your bike (which in itself is a good undertaking), then immediately do it right. You are trying to implement routing. See how it is implemented in ready-made solutions:
Django
Flask
You also need to decide whether your application will work on WSGI or will be a web server itself. Then the answer to your question will become clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question