funpay scrapper
0.1.3
이 라이브러리는 게임 항목을 구매 및 판매하기에 인기있는 온라인 시장 인 Funpay에서 데이터를 긁어내는 편리한 방법을 제공합니다.
Profile 클래스는 Funpay 프로파일을 나타내며 프로파일에 대한 정보를 검색하는 방법을 제공합니다.
get_data() : 프로파일의 원시 HTML 데이터를 검색합니다.rating() : 프로필의 등급을 반환합니다.nickname() : 프로필의 별명을 반환합니다.offers() : 프로필에서 작성한 제안 목록을 반환합니다. Lots 클래스는 펀 페이 로트 객체를 나타내며 로트에 대한 정보를 검색하는 방법을 제공합니다.
get_data() : 로트의 원시 HTML 데이터를 검색합니다.clean_text(text) : 추가 공백과 스트리핑을 제거하여 텍스트를 정리합니다.lots_links(max_limit=10) : 로트 링크 사전을 반환합니다.sort_lots(sort_by="lowest") : 로트 링크를 비용으로 정렬합니다. 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'}
print ( "----------------------------------------------------------------" )
from funpay_scrapper . utils import Chat , Home
chat = Chat () # Initializes the Chat object
for message in chat . chat_messages ():
print ( message , chat . chat_messages ()[ message ]) # Prints the chat messages
home = Home () # Initializes the Home object
print ( home . find_game ( "AFK Arena" )) # Output: True, lINK(HREF) | Warning! Please don't confuse chips id with lots id!