00:19.14 | Megalon | rides his wall into battle |
00:23.12 | *** join/#wowace Ressy (Ressy@CPEa84e3f42f293-CMa84e3f42f290.cpe.net.cable.rogers.com) |
00:23.12 | *** join/#wowace Ressy (Ressy@WoWUIDev/WoWAce/ARL/Ressy) |
00:31.50 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
01:25.09 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
02:26.12 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
03:09.37 | *** join/#wowace Seerah (~RyanNL@104-180-66-29.lightspeed.mmphtn.sbcglobal.net) |
03:26.54 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
03:46.49 | *** join/#wowace deepbook5broo (~gk.1wm.su@2a03:4a80:2:2d4:2d4:e830:6db2:a7d4) |
03:46.49 | *** part/#wowace deepbook5broo (~gk.1wm.su@2a03:4a80:2:2d4:2d4:e830:6db2:a7d4) |
04:23.48 | *** join/#wowace ls- (~ls@180.183.94.157) |
04:27.36 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
05:27.04 | *** part/#wowace Seerah (~RyanNL@104-180-66-29.lightspeed.mmphtn.sbcglobal.net) |
05:28.21 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
05:31.22 | *** join/#wowace ShadniX (dagger@p5DDFE1C3.dip0.t-ipconnect.de) |
05:47.11 | Megalon | "this is statistically probably kinda true" |
06:29.10 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
06:31.56 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
06:59.14 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
07:10.50 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
07:29.51 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
07:30.21 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
07:46.10 | *** join/#wowace mitch0 (~mitch@188-143-125-206.pool.digikabel.hu) |
07:51.17 | *** join/#wowace Yoshimo (~anything@unaffiliated/yoshimo) |
07:52.44 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
08:02.23 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
08:19.11 | *** join/#wowace ls-_ (~ls@ppp-171-97-253-221.revip8.asianet.co.th) |
08:20.59 | *** join/#wowace ls-__ (~ls@223.206.60.173) |
08:23.03 | Phixion | morning |
08:23.03 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
08:30.37 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
08:31.15 | Phixion | :( |
09:04.22 | *** join/#wowace Gethe_ (~Gethe@cpe-24-55-13-244.austin.res.rr.com) |
09:31.22 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
09:36.08 | *** join/#wowace Kesava (~kesava@unaffiliated/sliker) |
09:49.06 | *** join/#wowace Kesava (~kesava@static-84-9-212-2.vodafonexdsl.co.uk) |
09:49.06 | *** join/#wowace Kesava (~kesava@unaffiliated/sliker) |
10:18.02 | *** join/#wowace Kesava (~kesava@static-84-9-212-2.vodafonexdsl.co.uk) |
10:18.02 | *** join/#wowace Kesava (~kesava@unaffiliated/sliker) |
10:24.35 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
10:36.27 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
10:38.07 | znf | jesus christ |
10:38.12 | znf | wordpress' backup format is insane |
10:38.18 | znf | [root@giani ../restaurantedelux/export]# wc -l restaurantedelux.wordpress.2017-02-17.1558.xml |
10:38.18 | znf | 1086221 restaurantedelux.wordpress.2017-02-17.1558.xml |
10:38.18 | znf | [root@giani ../restaurantedelux/export]# du -hs restaurantedelux.wordpress.2017-02-17.1558.xml |
10:38.18 | znf | 36M restaurantedelux.wordpress.2017-02-17.1558.xml |
10:56.00 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
11:01.16 | *** join/#wowace Yoshimo (~anything@unaffiliated/yoshimo) |
11:07.39 | *** join/#wowace Kesava (~kesava@static-84-9-212-2.vodafonexdsl.co.uk) |
11:07.39 | *** join/#wowace Kesava (~kesava@unaffiliated/sliker) |
11:08.21 | *** join/#wowace harl (harl@unaffiliated/harl) |
11:25.13 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
11:27.37 | *** join/#wowace NuSuey (uid3556@gateway/web/irccloud.com/x-wuhbafglvhnjnyhs) |
11:46.09 | *** join/#wowace Cairenn1 (~Owner@2607:fea8:e380:16:6531:d6f7:c128:d131) |
11:52.00 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
12:24.28 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
12:26.19 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
13:13.07 | *** join/#wowace stolenlegacy (~stolenleg@213-47-49-27.cable.dynamic.surfer.at) |
13:13.07 | *** join/#wowace stolenlegacy (~stolenleg@unaffiliated/stolenlegacy) |
13:16.39 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
13:26.43 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
13:50.19 | *** join/#wowace Dajova (~Dajova@c-3e0ee255.010-44-6e796b1.cust.bredbandsbolaget.se) |
14:07.43 | Phixion | I bofh'd Fisker |
14:25.36 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
14:27.34 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
14:44.50 | *** join/#wowace devnull84 (~devnull84@196.15.203.251) |
14:46.23 | *** join/#wowace Devnull84_ (~devnull84@196.15.203.251) |
14:53.57 | *** join/#wowace Megalon (~wig0r@212-60-175-51.adsl.highway.telekom.at) |
14:54.22 | *** join/#wowace Cairenn (~Owner@MMOI/Administratrix/Cairenn) |
14:54.22 | *** mode/#wowace [+o Cairenn] by ChanServ |
15:06.54 | *** join/#wowace Aiue (~aiue@h-4-145-174.a163.priv.bahnhof.se) |
15:28.18 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
15:33.18 | *** join/#wowace Ressy (~Ressy@WoWUIDev/WoWAce/ARL/Ressy) |
16:28.36 | *** join/#wowace Fastfire (~kjetil@234.163.202.84.customer.cdi.no) |
16:29.04 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
17:24.52 | *** join/#wowace ls- (~ls@223.206.60.173) |
17:29.50 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
17:35.15 | *** join/#wowace harl (harl@unaffiliated/harl) |
17:38.32 | *** join/#wowace devnull84 (~devnull84@169-1-178-162.ip.afrihost.co.za) |
17:41.14 | *** join/#wowace devnull84 (~devnull84@196.25.230.34) |
18:18.15 | *** join/#wowace Guest6 (~textual@162-223-221-68.cpe.ngl.ninja) |
18:22.00 | *** join/#wowace Guest6 (~textual@162-223-221-68.cpe.ngl.ninja) |
18:25.03 | *** join/#wowace Yoshimo (~anything@unaffiliated/yoshimo) |
18:30.34 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
18:31.21 | *** join/#wowace Guest6 (~textual@162-223-221-68.cpe.ngl.ninja) |
18:35.10 | *** join/#wowace Seerah (~RyanNL@104-180-66-29.lightspeed.mmphtn.sbcglobal.net) |
19:04.39 | *** join/#wowace EthanCentaurai (~EthanCent@79-76-212-235.dynamic.dsl.as9105.com) |
19:31.19 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
19:39.26 | *** join/#wowace Ressy (~Ressy@toroon6126w-lp130-03-70-54-122-131.dsl.bell.ca) |
19:47.06 | znf | oh Stanzilla http://i.imgur.com/ZDdUJLd.png |
19:47.28 | Stanzilla | grats |
19:47.48 | Stanzilla | now you have a pretty sick aoe trinket combo and one for single |
19:49.16 | znf | I guess! |
19:49.55 | Stanzilla | I have metro + whispers fury atm |
19:49.58 | Stanzilla | but I kinda never use fury |
19:51.20 | Gnarfoz | znf: zstd -19 --rm restaurantedelux.wordpress.2017-02-17.1558.xml :D |
19:51.25 | *** join/#wowace Ressia (~Ressy@WoWUIDev/WoWAce/ARL/Ressy) |
19:52.03 | Fisker | I think Stanzilla is cool |
19:53.21 | *** join/#wowace starfox (~wig0r@213-157-153-126.adsl.highway.telekom.at) |
20:07.44 | Stanzilla | Funkeh`: BigWigs: Attempted to start bar "208807" without a valid time. |
20:07.44 | Stanzilla | BigWigs: Attempted to start bar "recursive_elemental" without a valid time. |
20:27.57 | Stanzilla | Funkeh`: BigWigs: Module Gul'dan uses "229945" as a toggle option, but it does not exist in the modules default values. |
20:27.58 | Stanzilla | BigWigs: Module Gul'dan uses "229945" as a toggle option, but it does not exist in the modules default values. |
20:29.46 | *** join/#wowace devnull84 (~devnull84@169-1-178-38.ip.afrihost.co.za) |
20:30.18 | *** join/#wowace devnull84 (~devnull84@196.25.230.34) |
20:32.04 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
21:02.17 | *** join/#wowace Yoshimo (~anything@unaffiliated/yoshimo) |
21:07.25 | *** join/#wowace Vilkku (vilkku@unaffiliated/vilkku) |
21:33.05 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
21:40.55 | znf | XPath must be the most horrible way you can parse HTML |
21:41.15 | nevcairiel | thats probably because its for xml |
21:41.17 | nevcairiel | not html |
21:42.44 | znf | that's what everybody suggests to use to parse html in php |
21:43.06 | nevcairiel | probably because parsing html is never that much fun |
21:43.31 | nevcairiel | too bad noone cared about xhtml, well-formated xml would've made it easier =p |
21:43.58 | znf | the syntax is not the issue |
21:45.31 | znf | I'm trying to get all the child li's of an ul |
21:45.45 | znf | which should be something like |
21:45.46 | znf | $xpath->query("//ul[@class='list']/li") |
21:45.51 | znf | except it's not |
21:45.53 | nevcairiel | someone should invent server-side jquery |
21:46.37 | znf | there was a php class for that |
22:07.27 | Semlar | don't worry, you can use jquery with node |
22:07.58 | znf | still struggling with this shit |
22:08.04 | Semlar | what are you trying to access? |
22:08.45 | Semlar | your path there wants direct li descendents from every ul with the class of list |
22:08.58 | znf | I have an unordered list |
22:09.06 | znf | each list item has some specific children |
22:09.24 | Semlar | do you have the html somewhere i can look at |
22:10.53 | znf | there |
22:11.02 | znf | now, that's the while unordered list |
22:11.39 | znf | for each list item, I want to check the thumbnail_label content |
22:12.21 | znf | or, rather, I want to filter them all by the class, that could work too |
22:12.26 | Semlar | like //ul[@class='list']//div[@class="thumbnail_label"] |
22:13.03 | Semlar | oh well i guess it needs contains since that's not the only class |
22:13.12 | znf | but... |
22:13.42 | znf | for each of those, I want to grab the content of first <a href="content here"> |
22:14.04 | znf | ie: if thumbnail_label_c_hd, then grab the <a href=""> |
22:14.25 | Semlar | in one operation? |
22:14.46 | Semlar | i don't know that you can do that with xpath alone |
22:14.49 | znf | not really, I wanted to do this xpath shit in the first go, maybe turn this crap into an array |
22:14.54 | znf | then iterate over the array |
22:14.59 | znf | but that seems to be difficult in php |
22:15.06 | znf | or I'm just not understanding hit |
22:15.12 | Semlar | what's the first xpath you mentioned giving you |
22:15.22 | Semlar | it's not giving you the <li> elements? |
22:15.50 | znf | it's giving me an object with the length of 58, which is correct |
22:16.01 | znf | but I've no idea how to either convert this crap to an array or iterate over it |
22:16.13 | znf | basically, I don't understand the object properties |
22:17.34 | znf | give beautifulsoup for PHP :-/ |
22:17.56 | Semlar | it's giving you an array of element objects |
22:18.23 | Semlar | you should be able to iterate over it like any other array and use the simplexml methods on the objects |
22:19.28 | Semlar | foreach($xpath->query("//ul[@class='list']/li") as $item) |
22:20.08 | Semlar | $li = simplexml_load_string($item->asXML()) |
22:20.34 | znf | where do you even get the object properties? I'm wondering around aimlessly on PHP's doc site |
22:20.57 | Semlar | http://php.net/manual/en/class.simplexmlelement.php |
22:21.33 | znf | PHP Fatal error: Uncaught Error: Call to a member function asXML() on null in |
22:21.36 | znf | *shrug* |
22:21.50 | Semlar | did you typo $item or something |
22:22.10 | znf | I did, indeed |
22:22.14 | znf | PHP Fatal error: Uncaught Error: Call to undefined method DOMElement::asXML() |
22:22.30 | znf | honestly, I would have done it 2 hours ago with fucking regex by now |
22:23.47 | Semlar | sorry what dom function are you using |
22:23.57 | Semlar | it's been a while since i wrote php |
22:24.43 | Semlar | i guess they use a different one for html |
22:24.57 | znf | DOMXPath |
22:24.58 | Semlar | http://php.net/manual/en/class.domelement.php |
22:26.16 | znf | I don't understand shit from that |
22:28.35 | Semlar | try uhh $divs = $xpath->query("descendant::div[contains(@class, 'thumbnail_label')]", $item) inside the loop |
22:30.22 | Semlar | it should hopefully give you an array with the div in it for that item |
22:30.40 | Semlar | and then if that works you can use that to check the other thing |
22:31.00 | Semlar | it's been like 10 years since i wrote php |
22:32.31 | znf | let me guess |
22:32.42 | znf | div[contains(@class, 'thumbnail_label_c')] |
22:32.44 | znf | will also match |
22:32.48 | znf | thumbnail_label_c_hd |
22:33.49 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
22:34.10 | Semlar | yes |
22:35.30 | Semlar | https://cweiske.de/tagebuch/XPath%3A%20Select%20element%20by%20class.htm this has a solution for that but it's pretty ugly |
22:35.51 | Semlar | contains(concat(' ', normalize-space(@class), ' '), ' $classname ') |
22:47.45 | znf | Semlar, that doesn't actually work btw |
22:48.03 | znf | oh, wait |
22:48.04 | znf | got it |
22:53.06 | znf | Semlar, how to get element's content? |
22:53.35 | Semlar | $item->nodeValue |
22:54.00 | Semlar | kind of depends on what you mean as content |
22:54.28 | znf | <a href="/whatever/">content</a> |
22:54.30 | znf | get content |
22:54.37 | Semlar | so just the text value |
22:54.41 | znf | yup |
22:54.46 | znf | ->nodeValue returns null |
22:55.13 | znf | ->getAttribute('href') returns /whatever/ |
22:55.22 | Semlar | did you try to call it or just do $item->nodeValue |
22:55.29 | Semlar | it's not a function |
22:55.59 | znf | $model = $xpath->query("descendant::a", $item); |
22:56.05 | znf | $name = $model->item(0)->textContent; |
22:56.06 | Semlar | should be able to use $item->textContent too |
22:56.10 | znf | null, so does nodeValue |
22:56.24 | znf | $model->item(0)->getAttribute('href') works tough |
22:56.52 | Semlar | well this <a> has no content |
22:56.56 | Semlar | it's empty |
22:57.04 | znf | Ooooh |
22:57.10 | znf | you're right, the 2nd one has the content |
22:57.10 | Semlar | i mean it has an img tag |
22:57.14 | znf | yup, you're right |
22:57.25 | znf | I'll just trim the / |
22:57.56 | Semlar | you can select a specific numbered element in the xpath with like a[2] or something |
22:58.01 | Semlar | but that's not always a good idea |
22:58.45 | znf | yeah, fuck it |
22:58.47 | znf | str_replace() it is |
22:58.50 | Semlar | the other thing about xpath is if the layout has a chance to change you're pretty SoL |
22:59.19 | Semlar | depending on how specific you make it |
22:59.45 | Semlar | like if ads get rotated into the html or something it could affect your program |
23:02.49 | znf | I'm aware |
23:02.50 | *** join/#wowace Ressy (Ressy@CPEa84e3f42f293-CMa84e3f42f290.cpe.net.cable.rogers.com) |
23:02.50 | *** join/#wowace Ressy (Ressy@WoWUIDev/WoWAce/ARL/Ressy) |
23:03.23 | znf | and I'm done |
23:03.24 | znf | thanks Semlar |
23:03.29 | Semlar | sure |
23:34.35 | *** join/#wowace webturtle0 (~webturtle@69.174.185.34) |
23:38.26 | quiescens | gives Semlar a cookie |
23:39.35 | Semlar | cookie monster |
23:50.03 | *** join/#wowace Semlar (~chatzilla@142-196-129-245.res.bhn.net) |
23:50.26 | znf | ...oh my god, now I remember all the times I wasn't able to make a jump on my priest |
23:50.30 | znf | from all the other places |