#ruby - 28 July 2018
« Back 1 day Forward 1 day »
[13:44:57] leitz: Is it possible to open a class and expand the initialize without subclassing, but such that you get the original initialize plus the new?
[14:28:51] leitz: The data was pulled in and then passed to the original object creation, and then also passed into a "setup_something(data)" method afterwards. The data has stuff for both original initialize and setup.
[14:34:33] leitz: compo_2.rb is the main program. Gist resotred them. https://gist.github.com/LeamHall/9d3fcde2195e8a840c2ef63f29c90eff
[14:59:22] ruby[bot]: -bb *!*@126.96.36.199$#ruby-banned *!*@ua-85-227-247-235.bbcust.telenor.se$#ruby-banned
[16:25:22] ruby[bot]: -bb *!*@2800:bf0:9fff:f428:ca1f:beff:fef4:689e$#ruby-banned *!*@mm-18-17-123-178.gomel.dynamic.pppoe.byfly.by$#ruby-banned
[17:13:23] wildermind: Hi I need to make a very simple script that will run on an AWS instance and query google ~60 times a day for a query and all I need to check is if the query returned a result. Ive been looking for some web scrappers with headless browsers and some ready made google-scraping tools in ruby but got lost. Any recommended framework to do it as quick as possible?
[19:01:14] Fira: Hi :) Sorry to bother, i'm messing around with interfacing to another system and have a small issue. It returns me strings in ISO-8859-1 that are URLEncoded then contain HTML entities. So far so good. However since it's ISO-8859-1, non-latin-1 characters are encoded as %u codepoints (don't ask me..) - is this normal and something I can solve in a pretty fashion that doesn't involve replacing them one by one ?
[19:02:03] Fira: I tried using CGI.unescape(..., 'iso-8859-1') which correctly replaces the standard URLEncoding and Entities, but it doesn't seem to convert the %u Unicode Codepoints
[19:27:50] Fira: Found a workaround on StackOverflow, thanks tho! Seems like it's related to JS escape(), yet nobody else uses that as it's quite bad as an encoding x(