WebView python not visible

I have made a python script that i want to keep awake, so i need to ping it using uptimer bot. so how do i get the url(WebView) in replit

Spam isn’t allowed on replit afaik, but just look up how to set up flask webserver on python

Also, welcome to Replit Ask!

Payload?? Really? You doing a DDoS attack?

You have to config the repl that it should run the file name spam.py

Also write this code on new file name flask.py or in the same file spam.py

# Importing flask module in the project is mandatory
# An object of Flask class is our WSGI application.
from flask import Flask

# Flask constructor takes the name of
# current module (__name__) as argument.
app = Flask(__name__)

# The route() function of the Flask class is a decorator,
# which tells the application which URL should call
# the associated function.
# ‘/’ URL is bound with hello_world() function.
def hello_world():
	return 'Hello World'

# run() method of Flask class runs the application
# on the local development server.


Note:There are some changes in Code.Credit for more details about Flask

Lol don’t know how to give credit

You don’t need to give credit for an effing a Flask app boilerplate…

1 Like

But latter someone will flag this right?

Ummm no? I don’t think so XD.

1 Like

The URL is repl-name.replit-username.repl.co. To get the webview, running the Repl should work. If not, click the + on the workspace tabs and click “Webview”. Also, as others mentioned, you will need to run the correct Py file (either change the default or rename it to main.py) as well as host it to the web somehow (such as with flask).

1 Like

No not at all ! I didnt even knew it was a ddos attack, i was just trying to automate my process of sending messages on discord on advertising servers

Thanks @OmegaOrbitals for telling this

1 Like

I have got one warning on this
So need to add it
That I should need to add credit otherwise I will get another warning then suspention of 1-2 says

What? Can you PM the post you were talking about?

Can’t do that @JayAySeaOhBee14

Ok… Why not XD? I am just trying to help you :sob:.