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

1 Like

Spam isnā€™t allowed on replit afaik, but just look up how to set up flask webserver on 0.0.0.0 python

1 Like

Also, welcome to Replit Ask!

1 Like

Payload?? Really? You doing a DDoS attack?

1 Like

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

1 Like

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

Code
# 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.
@app.route('/')
# ā€˜/ā€™ 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.
app.run(host='0.0.0.0'port=8080)
Credit

Credit

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

1 Like

Lol donā€™t know how to give credit

1 Like

You donā€™t need to give credit for an effing a Flask app boilerplateā€¦

2 Likes

@QwertyQwerty54
But latter someone will flag this right?

1 Like

Ummm no? I donā€™t think so XD.

2 Likes

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:.

A post was split to a new topic: How to get the websiteā€™s url from webview?