Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Development Extensions Return number of online search results? (PowerShell)

Return number of online search results? (PowerShell)
OneAngryGamer Away

#1
11-01-2021, 11:22 PM (This post was last modified: 12-07-2021, 12:48 AM by OneAngryGamer.)
I have some ideas for creating two new extensions that will be unlike any other Playnite extension.

To make this work, one of the things I need is code to return the number of search results for each game name.

e.g. If I run the function using "Tetris", it should return something like 17,000,000

If anybody is able to help me solve this I would appreciate it. (I will also credit your involvement when these extensions are released)
darklinkpower
Offline

Super Moderator
#2
11-01-2021, 11:48 PM (This post was last modified: 11-01-2021, 11:48 PM by darklinkpower.)
I think you need to be more specific. Results from where exactly? If it's from google, a simple regex to the page source will do the trick https://regexr.com/68lr8

Then use -match and the value will be in the index one of $matches
OneAngryGamer Away

#3
11-01-2021, 11:54 PM
(11-01-2021, 11:48 PM)darklinkpower Wrote: I think you need to be more specific. Results from where exactly? If it's from google, a simple regex to the page source will do the trick https://regexr.com/68lr8

Then use -match and the value will be in the index one of $matches

Thanks darklinkpower. I was avoiding being specific because I don't care which online search engine ends up being used.

Hmmm. I suppose I could regex the page source. (I do just that in an unreleased extension for downloading tags from a number of websites)
darklinkpower
Offline

Super Moderator
#4
11-02-2021, 05:31 AM
I see. The issue is the needed actual implementation will be unique to each page you may want to use, it's not possible to have a global solution.
OneAngryGamer Away

#5
11-16-2021, 12:00 PM
(11-02-2021, 05:31 AM)darklinkpower Wrote: The issue is the needed actual implementation will be unique to each page you may want to use

The extension would be using the same search engine for every search made. Why would the regex be unique for each search?
OneAngryGamer Away

#6
08-02-2023, 03:15 AM (This post was last modified: 08-02-2023, 03:19 AM by OneAngryGamer.)
I doubt I will ever get around to creating this so I will give away the ideas for anybody to use if they want.



What this would have done is to create a formula for concepts like Cult Classics or Hidden Gems. Games that meet the formula requirements could then be tagged and filtered.



Cult Classic = (Community Rating = High AND Game Sales = Low)



Hidden Gem = (Community Rating = High AND Awareness = Low)




Comments:
  • Community Rating could be obtained from websites such as MetaCritic or MobyGames
  • Awareness would be calculated by Number of Search Engine Results for GameName (+Platform Name?)  / Max Awareness.
  • Max Awareness = Highest awareness number found for any game (I'm guessing Pacman Tetris or Space Invaders?)
  • Games Sales would need a website that tracks games sales. It would need to be divided by the number of consoles sold to keep it relative. Some old games may not appear to be best sellers if compared to modern AAA releases but they are best sellers as a percentage of that console sold.
  • The thresholds for High and Low are arbitrary - these percentages would need to be tweaked by the developer.
  • Not just Cult Classic + Hidden Gem. This could also be used to find & tag games that are Best Sellers - (Total Games Sold / Consoles Sold = HIGH)
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode