Update web scraping code of existing Python script

Need to update code below to scrape data from an updated website that now has data formatted on the screen differently.

Only the part of the code that scrapes the data and sends to a file needs to be updated.

The new website address is [url removed, login to view]

I have very small budget as this is just a hobby project for my personal use. I also expect this to be very easy for anyone who knows what they are doing. Many thanks in advance.

Here is the original code:

import [url removed, login to view]

import csv

import re

import json

import time

import os

import smtplib

reToken = [url removed, login to view]('RefreshCallback\((.+)\)')

filename_ = "[url removed, login to view]"

def saveHeader(data):

if not [url removed, login to view](filename_):


def saveContent(data):

with open(filename_, 'a', encoding='utf-16', newline='') as f:

w = [url removed, login to view](f, delimiter='\t', quotechar='"', quoting=csv.QUOTE_MINIMAL)

# print(data)

[url removed, login to view](data)

# main

url = "[url removed, login to view]"

while (True):

curTime = [url removed, login to view]()

print ("Monitoring server activity ...")

httpData = [url removed, login to view](url).read().decode("utf-8", 'ignore')

data = [url removed, login to view](httpData)[0]

saveHeader(["mod_name", "cur_players", "max_players", "server_name", "track_name", "has_password", "timestamp"])

jsonData = [url removed, login to view](data)

for item in jsonData:

#saveContent([item["fields"]["mod_name"], item["fields"]["cur_players"], item["fields"]["max_players"], item["fields"]["server_name"], item["fields"]["track_name"], item["fields"]["has_password"], curTime])

#print (item["fields"]["server_name"])

if item["fields"]["server_name"] == "LolaT280LochDrummond" and item["fields"]["cur_players"] > 1:

SMTP_SERVER = '[url removed, login to view]'

print("Someone has joined your room!")


sender = '[put sending email here]'

recipient = '[put receiving email here]'

subject = 'Someone has joined your room!'

body = 'blah blah blah'

"Sends an e-mail to the specified recipient."

body = "" + body + ""

headers = ["From: " + sender,

"Subject: " + subject,

"To: " + recipient,

"MIME-Version: 1.0",

"Content-Type: text/html"]

headers = "\r\n".join(headers)

session = [url removed, login to view](SMTP_SERVER, SMTP_PORT)

[url removed, login to view]()

[url removed, login to view]()

[url removed, login to view]

[url removed, login to view](sender, "[put your email password here]")

[url removed, login to view](sender, recipient, headers + "\r\n\r\n" + body)

[url removed, login to view]()

print("Done. Sleeping ... ")

[url removed, login to view](60)

Compétences : Python

en voir plus : world code no, web scraping part time, web scraping https, small project in python, scraping web content, scraping e commerce web, scraping a server, need a screen writer, mail request to content writer, html code for e commerce website, e mail writer, decode a password, content writer in commerce, content writer for commerce, code 8 com, blah blah your needs, what is data scraping, web scraping with r, python writer, python csv to json

Concernant l'employeur :
( 9 commentaires ) Lexington, United States

Nº du projet : #6797305

Décerné à:


I have already wrote the code. It is well commented and readable. Your code sends an email every 60 seconds if someone is on your server. My code sends the email only when someone joins the server, so it doesn't spam t Plus

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 0 jours
(0 Commentaires)

3 freelances font une offre moyenne de 13 $ pour ce travail


A proposal has not yet been provided

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(31 Commentaires)

i have recently learn python from udacity and codecademy. you can give this work to me. Thank you. Abdullah

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(0 Commentaires)