Jump to content
  • 0

Official common_drop_item.txt; etc_drop_item.txt; mob_drop_item.txt; special_item_group.txt


byr

Question

3 answers to this question

Recommended Posts

  • 1
  • Moderator

Wikipedia has a API included, you can play with it.

MediaWiki docs:

Some examples:

You've to install the requests library first one.

pip install requests
# Installing collected packages: certifi, chardet, urllib3, idna, requests
# Successfully installed certifi-2019.3.9 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.2

How to use:

Hidden Content

    #!/usr/bin/python3
    import requests
    request = requests.Session()
    
    PARAMS = {
        "action": "query",
        "format": "json",
        "titles": "Shaman",
        "prop": "info",
        "inprop": "url|talkid"
    }
    print(request.get(url="http://wiki.metin2.co.uk/api.php", params=PARAMS).json())
    
    >>> {'query': {'pages': {'186': {'pageid': 186, 'ns': 0, 'title': 'Shaman', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'touched': '2017-01-08T18:38:16Z', 'lastrevid': 41761, 'counter': 136462, 'length': 7551, 'fullurl': 'http://wiki.metin2.co.uk/index.php/Shaman', 'editurl': 'http://wiki.metin2.co.uk/index.php?title=Shaman&action=edit'}}}}
    >>> Process finished with exit code 0

    If you read some hours all the docs you will understand how the API works and you can do some python scripts and extract all of the things which you want, easily.

    Already i did a small python tool to extract some drops from category Opponentoverview (Monsters), maybe i'll post it when is finished.

  • Metin2 Dev 4
  • Love 13
  • Good 7
  • Confused 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.