Answer the question
In order to leave comments, you need to log in
How to write a parser for the site https://cristalix.ru/?
In general, I am a beginner "programmer".
A friend asked me to create a parsing for the site https://cristalix.ru/
But I don't really understand how to work with requests and BS4.
I need to get how many players are playing from the site.
My not working code:
#Импорт
import requests
from bs4 import BeautifulSoup as BS
#бла бла
r = requests.get('https://cristalix.ru/')
html = BS(r.content, 'html.parser')
#бла бла
for el in html.select('.text-center'):
title = el.select('.text-title > h4')
print( title.text)
Answer the question
In order to leave comments, you need to log in
You can use https://cristalix.ru/data/technical/mcinfo to get online information in a convenient form (JSON, yay!).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question