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.11.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

e_sim_game_scraper-0.0.11-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: e_sim_game_scraper-0.0.11.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for e_sim_game_scraper-0.0.11.tar.gz
Algorithm Hash digest
SHA256 dfb8663faa1cc8d6c10b8e57b72795dd8b9978fe508e188851ab6b0024894659
MD5 d879f1ca2fe2bb38a481d33c7bde5ffa
BLAKE2b-256 ce5156fc2af04b5d3cf67ddada83f1b0ecb0b2391724a9c152f73af6031dca74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for e_sim_game_scraper-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 474de80b9141fd177893d9588e1afe3f0bc00e0408c9e3140e3e7ff0a40f8a25
MD5 9c2881a8989737a3d6a5852a689c9ea4
BLAKE2b-256 26b356b943c3134d46280e3ed18920c4a947a85c2bf0ca890747f8a7d0e4a460

See more details on using hashes here.

Supported by

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