Skip to main content

Funpay Scraper

Project description

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

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
# }

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

funpay_scrapper-0.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

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