Skip to main content

No project description provided

Project description

E-sim Scraper

Unofficial scraper for the e-sim browser game.

Installation

pip install -U e-sim-game-scraper

Usage

from e_sim_game_scrapper import EsimScraper

# or from e_sim_game_scrapper.EsimScraper import get_page_data

# Example 1
link = "https://luxia.e-sim.org/battleDrops.html?id=1&showSpecialItems=yes"
result = EsimScraper.get_page_data(link)
# >>> {'pages': 2, 'drops': [{'nick': 'Taturuski', 'item': 'Bandage size A', 'citizen_id': 912}, 
# >>>                        {'nick': 'Sverlio77_77', 'item': 'Bandage size C', 'citizen_id': 307}, ...]}

# Example 2 (locked page)
import requests
from lxml.html import fromstring

tree = fromstring(requests.get(link).text)  # this is a locked page, so you actually have to log-in first.
link = "https://luxia.e-sim.org/showShout.html?id=1"
result = EsimScraper.get_page_data(link, tree)
# or call the function directly:
result = EsimScraper.showShout(tree)

List of supported base-links / functions (alphabetical order):

  • achievement
  • article
  • auction
  • battleDrops
  • battles
  • battlesByWar
  • citizenStatistics
  • coalitionStatistics
  • companiesForSale
  • congressElections
  • countryEconomyStatistics
  • countryPoliticalStatistics
  • countryStatistics
  • events
  • jobMarket
  • law
  • monetaryMarket
  • newCitizenStatistics
  • newCitizens
  • news
  • newspaper
  • newspaperStatistics
  • party
  • partyStatistics
  • presidentalElections
  • productMarket
  • profile
  • region
  • showShout
  • stockCompany
  • stockCompanyMoney
  • stockCompanyProducts

(Note: not all of them are tested, some of them may not work properly, as those are dynamic pages that may change over time.)
There are tests for most of them locally, but they are not included in the package for now.

Support the Project:

The development and maintenance of this bot are ongoing. If you find it valuable, please consider supporting it through a donation:

Your contributions will help ensure the bot's continued improvement and availability for the e-Sim community.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

e_sim_game_scraper-0.0.8.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

e_sim_game_scraper-0.0.8-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file e_sim_game_scraper-0.0.8.tar.gz.

File metadata

  • Download URL: e_sim_game_scraper-0.0.8.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for e_sim_game_scraper-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e89dcb40e4076fe860cef718af6d956fccd9cae1f80c9e31193d5bb3cc43492b
MD5 25084e00015d99d195ebda9813dffd81
BLAKE2b-256 8837d21667287fe431fd29d4c8f0cd4ae7830da8e1d6e9883193dba87a8b2833

See more details on using hashes here.

File details

Details for the file e_sim_game_scraper-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for e_sim_game_scraper-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 12136a49e5329a3d2697f5ba88fe6f710dbb31f3dbefca90e97b6f4f9ee4db7f
MD5 d88ae9e8f21eec61bc5fd072edfec484
BLAKE2b-256 b88e1a2e1e02a7aecd7b5e6b276c0d47024610c7046eba301933f7f989a1df6d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page