Closed Blastinghavoc closed 6 years ago
Recreated today - it seems the html tags aren't being stripped? But it works for some, just not others as seen below (added a println() in the elementloop on line 70 of WebScraper.java)
SMDS
SMITH(DS)
GBX
480.10
+4.90
+1.03
SMIN
SMITHS GROUP
GBX
1,576.00
+6.00
+0.38 </td>
Error in thread
java.lang.NumberFormatException: For input string: "+0.38 </td>"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at footsiebot.datagathering.WebScraper.scrape(WebScraper.java:92)
at footsiebot.datagathering.DataGatheringCore.getData(DataGatheringCore.java:8)
at footsiebot.Core.downloadNewData(Core.java:382)
at footsiebot.gui.GUIcore.lambda$startDataDownload$15(GUIcore.java:399)
at java.lang.Thread.run(Thread.java:745)
Unfortunately still getting this issue, @lnevans
java.lang.NumberFormatException: For input string: "-30.00 </td>"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at footsiebot.datagathering.WebScraper.scrape(WebScraper.java:102)
at footsiebot.datagathering.DataGatheringCore.getData(DataGatheringCore.java:8)
at footsiebot.Core.downloadNewData(Core.java:477)
at footsiebot.gui.GUIcore.lambda$startDataDownload$15(GUIcore.java:446)
at java.lang.Thread.run(Thread.java:745)
Did this just happen randomly or was it just after you'd closed the program?
Ah after I'd closed it
Yeah looks like that's the only reason why it breaks, none of the methods I'm using would normally return a string with html tags. Only way to fix it seems to be with changing threading but for now just ignore it
Got this again just now, not during shutdown
java.lang.NumberFormatException: For input string: "-0.47 </td>"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at footsiebot.datagathering.WebScraper.scrape(WebScraper.java:105)
at footsiebot.datagathering.DataGatheringCore.getData(DataGatheringCore.java:8)
at footsiebot.Core.downloadNewData(Core.java:481)
at footsiebot.gui.GUIcore.lambda$startDataDownload$15(GUIcore.java:429)
at java.lang.Thread.run(Thread.java:745)
And again, having just pulled @lnevans
java.lang.NumberFormatException: For input string: "6760.00</td>"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at footsiebot.datagathering.WebScraper.scrape(WebScraper.java:113)
at footsiebot.datagathering.DataGatheringCore.getData(DataGatheringCore.java:8)
at footsiebot.Core.downloadNewData(Core.java:493)
at footsiebot.gui.GUIcore.lambda$startDataDownload$15(GUIcore.java:433)
at java.lang.Thread.run(Thread.java:745)
Added a clean function, should fix this finally
java.lang.NumberFormatException: For input string: "1260.50" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) at java.lang.Float.parseFloat(Float.java:451) at footsiebot.datagathering.WebScraper.scrape(WebScraper.java:87) at footsiebot.datagathering.DataGatheringCore.getData(DataGatheringCore.java:8) at footsiebot.Core.downloadNewData(Core.java:377) at footsiebot.gui.GUIcore.lambda$startDataDownload$15(GUIcore.java:386) at java.lang.Thread.run(Thread.java:748)