我在我的项目Pandas Dataframe 工作到csv文件。行是基于输入this is what I mean :3创建的,所以问题是第一行不断变化,因为我循环脚本the results :3。还需要帮助循环脚本
from ast import Break
import pandas as pd
import socket
import webbrowser,time
def introduction():
msg = '''
This is a python project made by Abhay R
of ************************************.
This project is based on how internet
service providers collect
data from clients\n\n\n\n\n'''
for x in msg:
print(x, end='')
time.sleep(0.002)
wait = input('Press any key to continue.....')
introduction()
print()
def begin():
url=input("ENTER YOUR WEB HERE:")
web=webbrowser.open_new_tab(url)
weblink = url
Domain_name = ""
x = weblink.split("/")
if(x[0] == "https:" or x[0] == "http:"):
x = x[2].split(".")
else:
x = x[0].split(".")
if(len(x) == 2):
Domain_name = x[0]
else:
Domain_name = x[1]
print("Domain Name Is:",Domain_name)
dns=socket.gethostbyname(weblink)
print("DNS:",dns)
domain=Domain_name
dns=dns
data={"WEBSITE":weblink,"DOMAIN":domain,"DNS":dns}
df1=pd.DataFrame(data,index=[1])
df1.to_csv("C:\\Users\\stdev\\Desktop\\IP PROJECT\\Book 9.csv")
cvv=pd.read_csv("C:\\Users\\stdev\\Desktop\\IP PROJECT\\Book 9.csv")
print(cvv)
begin()
希望我的问题是可以理解的,任何人都可以帮助我尽快解决这个问题。
1条答案
按热度按时间ryevplcw1#
问题已经解决了,谢谢@furas