Jump to content
LaunchBox Community Forums

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



fawkesyeah

Posted

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!

matiaspons

Posted

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.

samiam

Posted

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.

Firefairy

Posted

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
samiam

Posted

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
RegularRegs

Posted

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
SsjCosty

Posted

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?

  • Like 1
RegularRegs

Posted

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

  • Like 1
matiaspons

Posted

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 :) 

Lugawigaming

Posted

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
Hazuki

Posted

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
Wolfy217

Posted

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
Hazuki

Posted

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
matiaspons

Posted

I updated the plugin, should be working again :) 

  • Like 1
Hazuki

Posted

That's great news I'll be updating tomorrow morning. Thank you for the update

  • Like 1
Rhinoceritis

Posted

Seems to be not working again? Not sure because it could be something on my end

  • Unusual Gem 1
Funkitude

Posted

I really want this feature BUT can you walk me though with a more simple version of it please and thanks

Dutch Goose

Posted

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.

AquaJew

Posted

Just downloaded, still broken. Installs fine, but doesn't pull up data on any game.

  • Like 2
PeeWii

Posted

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.

PeeWii

Posted

All hope is not lost !

So I basterdized the source code to get it done (this is my first time fiddling with c# and the tools) but the result is good.

Have fun.

HLTBPlugin.zip

  • Like 2
  • Unusual Gem 1
Elayness

Posted

On 11/8/2023 at 4:12 AM, PeeWii said:

All hope is not lost !

So I basterdized the source code to get it done (this is my first time fiddling with c# and the tools) but the result is good.

Have fun.

HLTBPlugin.zip 11.39 kB · 9 downloads

You're the freakin' GOAT. Well done, works great. 

Drodrik

Posted

On 11/8/2023 at 4:12 AM, PeeWii said:

All hope is not lost !

So I basterdized the source code to get it done (this is my first time fiddling with c# and the tools) but the result is good.

Have fun.

HLTBPlugin.zip 11.39 kB · 21 downloads

It works! great man, thanks


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...