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 0.0.0.0 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
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
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ā¦
Ummm no? I donāt think so XD.
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
).
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
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?
Ok⦠Why not XD? I am just trying to help you .