Jump to content
LaunchBox Community Forums

How Long To Beat - Game Length Plugin 1.0.3

   (5 reviews)

5 Screenshots

About This File

About

Plugin that scrapes information from HowLongToBeat.com and adds custom fields with game lengths information.

I made this plugin to add length information for certain games, mostly rpgs. This adds 3 custom fields for Main Story, Main + Extra and Completionist length. You can configure which ones you want to add by editing the file HLTBPlugin.xml.

Because there's no oficial API from HLTB, I had to parse the HTML, which means that as soon as they change something on the HTML this plugin probably will stop working...

Install

Extract files (dll + xml) to : Launchbox/Plugins/HLTBPlugin.

Config (HLTBPlugin.xml)

  • MainStoryLength: Enable/disable main story length update. Default: true.
  • MainExtraLength: Enable/disable main story + extra length update. Default: true.
  • CompletionistLength: Enable/disable completionist length update. Default: true.
  • MainStoryFieldName: Change main story length custom field name. Default: Main Story Length
  • MainExtraFieldName: Change main story + extra length custom field name. Default: Main + Extra Length
  • CompletionistFieldName: Change completionist length custom field name. Default: Completionist Length

Note: If you change the fields names it will not update the games that already have information, so you will end up with duplicated fields with different names and you will have to manually delete them (edit game -> custom fields tab). So config the first time and stick with that.

Usage

Access the option by right-click a game (only one game, no massive update yet). A window will popup with all the games found and you can choose which one correspond to your game. If there's no results you can manually change the search words (e.g. Metal Gear Ac!d will get no results but you can then change the search to Metal Gear Acid).

You can use the "Arrange By" option to order the games by length. Lengths are shown with leading zeroes because is the only way to properly order the games since custom fields are strings and not integers.

Tested on version 8.9. I think you need a premium license because custom fields are not supported in free license (not sure).

1.thumb.jpg.af7728582cdeb302ebbf4caad33defea.jpg2.thumb.jpg.eb1de3e8a8247fc22eefaa30f6f487de.jpg3.jpg.e0b5d1c12c72bcb131952b6d41877453.jpg4.thumb.jpg.ad5d22bab6344ddc943ce6e3b34eac89.jpg

I have no relation with HowLongToBeat.com, if you like their work please go and support them.

 

Public Repository

https://github.com/matiasponsml/HLTBPlugin

 


What's New in Version 1.0.3   See changelog

Released

Small fix to make it work again.

  • Like 4
  • Thanks 4
  • Unusual Gem 3

User Feedback

Recommended Comments



Love it! Although I have a feature request: Could you please make it overwrite the custom field if you run the search again?

I have found that the plugin will not currently overwrite a value if it already contains one in the custom fields used by this plugin. I might want to make a change and then revert it, or use the fields for other means and then overwrite them again later. Please, and thank you for the awesome plugin!

Link to comment
Share on other sites

1 hour ago, fawkesyeah said:

Love it! Although I have a feature request: Could you please make it overwrite the custom field if you run the search again?

I have found that the plugin will not currently overwrite a value if it already contains one in the custom fields used by this plugin. I might want to make a change and then revert it, or use the fields for other means and then overwrite them again later. Please, and thank you for the awesome plugin!

Glad you like it!

I just tested it and it is overwriting old values every time you run the search. This is what I did, I ran the search on a game, then manually edited the custom field value with other value, then ran the search again and the value was updated with the original. Please tell me if this is what you meant.

One thing to notice is that if you manually change the name of the custom field, then it will create a new one if you run the search again, this is because the field is updated by name. Another thing is that you wont immediately see the update after running the search, you have to select another game and then back to actually see the update in the right panel. Hope this helps.

Link to comment
Share on other sites

This is fantastic, as others have said its ashamed there is no API. Id love to see a mass update when you update all the media & meta data. Also id love to see this in big box in the game details. All in all a great addition. I understand the lack of an API makes this more difficult.

Link to comment
Share on other sites

Sadly, it looks like they have changed the HTML. I get some text config and "We have found 1 Game", but not the name of said game so I can confirm. Still seems to work otherwise, I am just concerned about whether the match is the right one.

  • Like 1
Link to comment
Share on other sites

from what i am gathering you could just as easily scrape the entire site howlongtobeat.com HTML capturing the data you want then format it into a launchbox friendly xml like this plugin outputs now. Then you have data for all games on howlongtobeet.com. You no longer have to worry about the sites html changing every time you add a game.

  • Like 1
Link to comment
Share on other sites

On 11/10/2019 at 12:32 AM, samiam said:

from what i am gathering you could just as easily scrape the entire site howlongtobeat.com HTML capturing the data you want then format it into a launchbox friendly xml like this plugin outputs now. Then you have data for all games on howlongtobeet.com. You no longer have to worry about the sites html changing every time you add a game.

is that something someone would be willing to write? i dont know how to code at all. that sounds like a solution though

  • Like 1
Link to comment
Share on other sites

On 1/20/2020 at 2:11 AM, bottedumal said:

seems to not work anymore ?

 

On 6/10/2020 at 10:20 AM, SsjCosty said:

I can't wait to try this. But if it doesn't work anymore, I can help out with updating it. Is it open source?

 

On 6/19/2020 at 6:26 PM, deadyourinstinct said:

yeah it doesnt look like it works anymore :( it was a good one

 

Fixed and added link to public repo :) 

Link to comment
Share on other sites

I have a request!:

 

Can we have a Mass Game Length Scraper so we can have the game length of every game?

 

Btw really love this plugin! Really appreciate the hard work you're putting in this.

  • Like 1
Link to comment
Share on other sites

I think this plugin is fantastic. It would be fantastic if the time info could be displayed in BigBox. Thank you for sharing this plugin

  • Like 1
Link to comment
Share on other sites

On 1/25/2021 at 6:31 PM, Hazuki said:

I think this plugin is fantastic. It would be fantastic if the time info could be displayed in BigBox. Thank you for sharing this plugin

 

Does it still work for you? I just downloaded it and when I go to check a games game length I just get the search window with no results and then clicking 'Support HowLongToBeat.com' I get a launchbox error 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Wolfy217 said:

Does it still work for you? I just downloaded it and when I go to check a games game length I just get the search window with no results and then clicking 'Support HowLongToBeat.com' I get a launchbox error 

No it doesn't work anymore, this was a great plugin when it was working.

  • Like 1
Link to comment
Share on other sites

It doesn't seem to work anymore, or i'm doing something wrong. If it is broken, i hope we will see a update soon. Cause i do really think this is a cool feature.

Link to comment
Share on other sites

Yeah, not working.

So I took a look at the plugin source code (I know some Java so I can understand c# a bit), the plugin tries to act as a Mozilla browser and search the howlongtobeat website for the selected game as if you are doing it manually then searches in the returned HTML (using CSS selectors) and puts the results in a table.

However, this no longer works because the website changed design and everything lately, many CSS classes changed so I went and adjusted this in the code and the result ? it kept shwing me results like "Spiderman 2" and "Mario Wonder" ..

It turns out that the biggest problem is that when calling a page like "https://howlongtobeat.com/?q=metroid" in the browser, it will show you the homepage first then it will search for "metroid" (most likely using javascript). And you can't get around this with c# a webclient ... The homepage is where popular searches like "Spiderman 2" and "Mario Wonder" came from.

This was most likely done to prevent web scraping methods (like what this plugin does) and it is effective.

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...