funpay-scrapper


Namefunpay-scrapper JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/KailUser/funpay-scrapper
SummaryFunpay Scraper
upload_time2024-06-26 05:50:23
maintainerNone
docs_urlNone
authorSyirezz
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Funpay Scrapper

This library provides convenient methods for scraping data from Funpay, a popular online marketplace for buying and selling game items.

### Profile
The `Profile` class represents a Funpay profile and provides methods for retrieving information about the profile.

- `get_data()`: Retrieves the raw HTML data of the profile.
- `rating()`: Returns the rating of the profile.
- `nickname()`: Returns the nickname of the profile.
- `offers()`: Returns a list of offers made by the profile.

### Lots
The `Lots` class represents a Funpay Lots object and provides methods for retrieving information about the lots.

- `get_data()`: Retrieves the raw HTML data of the lots.
- `clean_text(text)`: Cleans the text by removing extra whitespace and stripping.
- `lots_links(max_limit=10)`: Returns a dictionary of lots links.
- `sort_lots(sort_by="lowest")`: Sorts the lots links by cost.

## Examples

```python
from funpay_scrapper.profile import Profile
from funpay_scrapper.lots import Lots

profile = Profile(5682424) # Initializes the Profile object
print(profile.rating()) # Output: ?
print(profile.nickname()) # Output: Syirezz

print("----------------------------------------------------------------")

lots = Lots(1264) # Initializes the Lots object
x = lots.lots_links(10) # Returns a dictionary of lots links. The maximum number of lots links is 10 or more.
for key, value in x.items():
    print(key, value) # Prints the dictionary of lots links
# Output:
1 {'href': 'https://funpay.com/lots/offer?id=17094859', 'cost': '189.71 ₽', 'seller': 'zvadizz01'}
2 {'href': 'https://funpay.com/lots/offer?id=23577867', 'cost': '191.90 ₽', 'seller': 'N3CRO88'}
3 {'href': 'https://funpay.com/lots/offer?id=19861734', 'cost': '192.06 ₽', 'seller': 'KeyShop4ik'}
4 {'href': 'https://funpay.com/lots/offer?id=30402196', 'cost': '193.23 ₽', 'seller': 'cympaynopom'}
5 {'href': 'https://funpay.com/lots/offer?id=30190810', 'cost': '193.23 ₽', 'seller': 'ZhannaStewardess'}
6 {'href': 'https://funpay.com/lots/offer?id=17462750', 'cost': '194.09 ₽', 'seller': 'Bibba'}
7 {'href': 'https://funpay.com/lots/offer?id=17075913', 'cost': '195.55 ₽', 'seller': 'BoBka92PMT'}
8 {'href': 'https://funpay.com/lots/offer?id=30404335', 'cost': '195.57 ₽', 'seller': 'nikzpisdili'}
9 {'href': 'https://funpay.com/lots/offer?id=23581531', 'cost': '195.58 ₽', 'seller': 'GoodGameKeys'}
10 {'href': 'https://funpay.com/lots/offer?id=21583534', 'cost': '196.74 ₽', 'seller': 'Gastello29'}


# How lots links looks like
# lots_links[ID] = {
#     "href": href,
#     "cost": cost,
#     "seller": seller
# }
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KailUser/funpay-scrapper",
    "name": "funpay-scrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Syirezz",
    "author_email": "syirezz@icloud.com",
    "download_url": "https://files.pythonhosted.org/packages/0d/cf/334e8fb96e6c5d090fd6a283d9e0a50fe2fd56ff3a1fca200b21abaf0328/funpay_scrapper-0.1.1.tar.gz",
    "platform": null,
    "description": "# Funpay Scrapper\n\nThis library provides convenient methods for scraping data from Funpay, a popular online marketplace for buying and selling game items.\n\n### Profile\nThe `Profile` class represents a Funpay profile and provides methods for retrieving information about the profile.\n\n- `get_data()`: Retrieves the raw HTML data of the profile.\n- `rating()`: Returns the rating of the profile.\n- `nickname()`: Returns the nickname of the profile.\n- `offers()`: Returns a list of offers made by the profile.\n\n### Lots\nThe `Lots` class represents a Funpay Lots object and provides methods for retrieving information about the lots.\n\n- `get_data()`: Retrieves the raw HTML data of the lots.\n- `clean_text(text)`: Cleans the text by removing extra whitespace and stripping.\n- `lots_links(max_limit=10)`: Returns a dictionary of lots links.\n- `sort_lots(sort_by=\"lowest\")`: Sorts the lots links by cost.\n\n## Examples\n\n```python\nfrom funpay_scrapper.profile import Profile\nfrom funpay_scrapper.lots import Lots\n\nprofile = Profile(5682424) # Initializes the Profile object\nprint(profile.rating()) # Output: ?\nprint(profile.nickname()) # Output: Syirezz\n\nprint(\"----------------------------------------------------------------\")\n\nlots = Lots(1264) # Initializes the Lots object\nx = lots.lots_links(10) # Returns a dictionary of lots links. The maximum number of lots links is 10 or more.\nfor key, value in x.items():\n    print(key, value) # Prints the dictionary of lots links\n# Output:\n1 {'href': 'https://funpay.com/lots/offer?id=17094859', 'cost': '189.71 \u20bd', 'seller': 'zvadizz01'}\n2 {'href': 'https://funpay.com/lots/offer?id=23577867', 'cost': '191.90 \u20bd', 'seller': 'N3CRO88'}\n3 {'href': 'https://funpay.com/lots/offer?id=19861734', 'cost': '192.06 \u20bd', 'seller': 'KeyShop4ik'}\n4 {'href': 'https://funpay.com/lots/offer?id=30402196', 'cost': '193.23 \u20bd', 'seller': 'cympaynopom'}\n5 {'href': 'https://funpay.com/lots/offer?id=30190810', 'cost': '193.23 \u20bd', 'seller': 'ZhannaStewardess'}\n6 {'href': 'https://funpay.com/lots/offer?id=17462750', 'cost': '194.09 \u20bd', 'seller': 'Bibba'}\n7 {'href': 'https://funpay.com/lots/offer?id=17075913', 'cost': '195.55 \u20bd', 'seller': 'BoBka92PMT'}\n8 {'href': 'https://funpay.com/lots/offer?id=30404335', 'cost': '195.57 \u20bd', 'seller': 'nikzpisdili'}\n9 {'href': 'https://funpay.com/lots/offer?id=23581531', 'cost': '195.58 \u20bd', 'seller': 'GoodGameKeys'}\n10 {'href': 'https://funpay.com/lots/offer?id=21583534', 'cost': '196.74 \u20bd', 'seller': 'Gastello29'}\n\n\n# How lots links looks like\n# lots_links[ID] = {\n#     \"href\": href,\n#     \"cost\": cost,\n#     \"seller\": seller\n# }\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Funpay Scraper",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/KailUser/funpay-scrapper"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3552d4bf9046a388196bc19f11978ad925eec553cf885496659893bbab671d30",
                "md5": "441c584eaa30dc8602e4697a5608d2fc",
                "sha256": "9b10097cbeb77b4e0ebcf707f39f7eac796ba73e8f64c066954dfc411e329c1d"
            },
            "downloads": -1,
            "filename": "funpay_scrapper-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "441c584eaa30dc8602e4697a5608d2fc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5673,
            "upload_time": "2024-06-26T05:50:22",
            "upload_time_iso_8601": "2024-06-26T05:50:22.471682Z",
            "url": "https://files.pythonhosted.org/packages/35/52/d4bf9046a388196bc19f11978ad925eec553cf885496659893bbab671d30/funpay_scrapper-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0dcf334e8fb96e6c5d090fd6a283d9e0a50fe2fd56ff3a1fca200b21abaf0328",
                "md5": "c10243dbd41e7fda33cd39de73d417cb",
                "sha256": "148c17deb3aa969b09ede219e9caf970686efc89336ca2d841f381e0ab981788"
            },
            "downloads": -1,
            "filename": "funpay_scrapper-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c10243dbd41e7fda33cd39de73d417cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4525,
            "upload_time": "2024-06-26T05:50:23",
            "upload_time_iso_8601": "2024-06-26T05:50:23.902281Z",
            "url": "https://files.pythonhosted.org/packages/0d/cf/334e8fb96e6c5d090fd6a283d9e0a50fe2fd56ff3a1fca200b21abaf0328/funpay_scrapper-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-26 05:50:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KailUser",
    "github_project": "funpay-scrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "funpay-scrapper"
}
        
Elapsed time: 0.28447s