pstuteville-scrubyt 0.4.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (520) hide show
  1. data/CHANGELOG +355 -0
  2. data/COPYING +340 -0
  3. data/README.rdoc +121 -0
  4. data/Rakefile +120 -0
  5. data/VERSION +1 -0
  6. data/examples/README.txt +1 -0
  7. data/examples/events/delta/input.html +682 -0
  8. data/examples/events/delta/test.rb +16 -0
  9. data/examples/misc/auto_regex/input.html +22 -0
  10. data/examples/misc/auto_regex/test.rb +14 -0
  11. data/examples/misc/compound_example/advanced/test.rb +11 -0
  12. data/examples/misc/compound_example/advanced/tricky_compound.html +9 -0
  13. data/examples/misc/compound_example/regexp/regexp_compound.html +17 -0
  14. data/examples/misc/compound_example/regexp/test.rb +11 -0
  15. data/examples/misc/compound_example/simple/compound.html +5 -0
  16. data/examples/misc/compound_example/simple/test.rb +11 -0
  17. data/examples/misc/detail_page/detailpage.html +6 -0
  18. data/examples/misc/detail_page/index.html +9 -0
  19. data/examples/misc/detail_page/test.rb +17 -0
  20. data/examples/misc/google/test.rb +39 -0
  21. data/examples/misc/identical_examples/data_extractor_export.rb +12 -0
  22. data/examples/misc/identical_examples/input.html +16 -0
  23. data/examples/misc/identical_examples/test.rb +15 -0
  24. data/examples/misc/immediate_attribute_extraction/data_extractor_export.rb +10 -0
  25. data/examples/misc/immediate_attribute_extraction/input.html +16 -0
  26. data/examples/misc/immediate_attribute_extraction/test.rb +14 -0
  27. data/examples/misc/multiple_examples/input.html +7 -0
  28. data/examples/misc/multiple_examples/test.rb +22 -0
  29. data/examples/misc/on_click_next/next_page_link.rb +42 -0
  30. data/examples/misc/on_click_next/page_1.html +10 -0
  31. data/examples/misc/on_click_next/page_2.html +10 -0
  32. data/examples/misc/on_click_next/page_3.html +7 -0
  33. data/examples/misc/rubycorner/test.rb +29 -0
  34. data/examples/misc/rubyforge_login/test.rb +30 -0
  35. data/examples/misc/tables/ambigous_records/input.html +17 -0
  36. data/examples/misc/tables/ambigous_records/test.rb +37 -0
  37. data/examples/misc/tables/another_plain_table/input.html +15 -0
  38. data/examples/misc/tables/another_plain_table/test.rb +25 -0
  39. data/examples/misc/tables/complex_table/input.html +45 -0
  40. data/examples/misc/tables/complex_table/test.rb +30 -0
  41. data/examples/misc/tables/grab_rows/input.html +20 -0
  42. data/examples/misc/tables/grab_rows/test.rb +30 -0
  43. data/examples/misc/tables/plain_table/input.html +39 -0
  44. data/examples/misc/tables/plain_table/test.rb +35 -0
  45. data/examples/misc/tables/plain_table_morepages/2.html +38 -0
  46. data/examples/misc/tables/plain_table_morepages/3.html +33 -0
  47. data/examples/misc/tables/plain_table_morepages/input.html +40 -0
  48. data/examples/misc/tables/plain_table_morepages/test.rb +32 -0
  49. data/examples/misc/tables/plain_table_morepages_with_image/2.html +40 -0
  50. data/examples/misc/tables/plain_table_morepages_with_image/3.html +33 -0
  51. data/examples/misc/tables/plain_table_morepages_with_image/images/right_arrow.png +0 -0
  52. data/examples/misc/tables/plain_table_morepages_with_image/input.html +42 -0
  53. data/examples/misc/tables/plain_table_morepages_with_image/test.rb +32 -0
  54. data/examples/misc/tables/test_select_indices/input.html +46 -0
  55. data/examples/misc/tables/test_select_indices/test.rb +55 -0
  56. data/examples/misc/xpath_example_type/input.html +15 -0
  57. data/examples/misc/xpath_example_type/test.rb +18 -0
  58. data/examples/misc/yahoo_finance/test.rb +26 -0
  59. data/examples/social/blog_comment/test.rb +27 -0
  60. data/examples/social/del.icio.us/test.rb +22 -0
  61. data/examples/social/digg/test.rb +37 -0
  62. data/examples/social/dzone/test.rb +28 -0
  63. data/examples/social/linkedin/linkedin.rb +23 -0
  64. data/examples/social/reddit/test.rb +23 -0
  65. data/examples/tones_extractor_export.rb +23 -0
  66. data/examples/webshops/amazon/002-8212888-3924065.html +5311 -0
  67. data/examples/webshops/amazon/002-8212888-3924065_files/0130796034.jpg +0 -0
  68. data/examples/webshops/amazon/002-8212888-3924065_files/020161622X.jpg +0 -0
  69. data/examples/webshops/amazon/002-8212888-3924065_files/0321223675.jpg +0 -0
  70. data/examples/webshops/amazon/002-8212888-3924065_files/0465067107.jpg +0 -0
  71. data/examples/webshops/amazon/002-8212888-3924065_files/0470069155.jpg +0 -0
  72. data/examples/webshops/amazon/002-8212888-3924065_files/0470081201.jpg +0 -0
  73. data/examples/webshops/amazon/002-8212888-3924065_files/0596005253.jpg +0 -0
  74. data/examples/webshops/amazon/002-8212888-3924065_files/0596101325.jpg +0 -0
  75. data/examples/webshops/amazon/002-8212888-3924065_files/0596523696.jpg +0 -0
  76. data/examples/webshops/amazon/002-8212888-3924065_files/0672328844.jpg +0 -0
  77. data/examples/webshops/amazon/002-8212888-3924065_files/0764596861.jpg +0 -0
  78. data/examples/webshops/amazon/002-8212888-3924065_files/0974514055.jpg +0 -0
  79. data/examples/webshops/amazon/002-8212888-3924065_files/0976694069.jpg +0 -0
  80. data/examples/webshops/amazon/002-8212888-3924065_files/0977616606.jpg +0 -0
  81. data/examples/webshops/amazon/002-8212888-3924065_files/0977616614.jpg +0 -0
  82. data/examples/webshops/amazon/002-8212888-3924065_files/0977616630.jpg +0 -0
  83. data/examples/webshops/amazon/002-8212888-3924065_files/1590597362.jpg +0 -0
  84. data/examples/webshops/amazon/002-8212888-3924065_files/1594480060.jpg +0 -0
  85. data/examples/webshops/amazon/002-8212888-3924065_files/1932394699.jpg +0 -0
  86. data/examples/webshops/amazon/002-8212888-3924065_files/2841772101.jpg +0 -0
  87. data/examples/webshops/amazon/002-8212888-3924065_files/amzn-logo-118w.gif +0 -0
  88. data/examples/webshops/amazon/002-8212888-3924065_files/askville-adwidget-bullet.gif +0 -0
  89. data/examples/webshops/amazon/002-8212888-3924065_files/askville-logo-sm-adwidget-white-bg.gif +0 -0
  90. data/examples/webshops/amazon/002-8212888-3924065_files/book_display_on_website-icon.gif +0 -0
  91. data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-no-ns.gif +0 -0
  92. data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-no.gif +0 -0
  93. data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-yes-ns.gif +0 -0
  94. data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-yes.gif +0 -0
  95. data/examples/webshops/amazon/002-8212888-3924065_files/btn-no-tiny.gif +0 -0
  96. data/examples/webshops/amazon/002-8212888-3924065_files/btn-yes-tiny.gif +0 -0
  97. data/examples/webshops/amazon/002-8212888-3924065_files/buybox-button-find-gifts-a.gif +0 -0
  98. data/examples/webshops/amazon/002-8212888-3924065_files/c7y_badge_rn_1.gif +0 -0
  99. data/examples/webshops/amazon/002-8212888-3924065_files/cap-a9-3.gif +0 -0
  100. data/examples/webshops/amazon/002-8212888-3924065_files/drop-down-icon-small-arrow.gif +0 -0
  101. data/examples/webshops/amazon/002-8212888-3924065_files/endcap-a9-go-2.gif +0 -0
  102. data/examples/webshops/amazon/002-8212888-3924065_files/gb-open-new.gif +0 -0
  103. data/examples/webshops/amazon/002-8212888-3924065_files/gc-logo-popover-a.gif +0 -0
  104. data/examples/webshops/amazon/002-8212888-3924065_files/gift-cert-roto-pop-a.gif +0 -0
  105. data/examples/webshops/amazon/002-8212888-3924065_files/go-button-books.gif +0 -0
  106. data/examples/webshops/amazon/002-8212888-3924065_files/go-button.gif +0 -0
  107. data/examples/webshops/amazon/002-8212888-3924065_files/go-orange-trans.gif +0 -0
  108. data/examples/webshops/amazon/002-8212888-3924065_files/go_button_photo.gif +0 -0
  109. data/examples/webshops/amazon/002-8212888-3924065_files/logo-off.gif +0 -0
  110. data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-events-18134.js +1407 -0
  111. data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-n2v1-57871.css +364 -0
  112. data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-simplePopover-41153.js +749 -0
  113. data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-utilities-25439.js +1608 -0
  114. data/examples/webshops/amazon/002-8212888-3924065_files/orange-arrow.gif +0 -0
  115. data/examples/webshops/amazon/002-8212888-3924065_files/orange-arrow_002.gif +0 -0
  116. data/examples/webshops/amazon/002-8212888-3924065_files/popover-blurb.gif +0 -0
  117. data/examples/webshops/amazon/002-8212888-3924065_files/powered-by-a9.gif +0 -0
  118. data/examples/webshops/amazon/002-8212888-3924065_files/stars-3-5.gif +0 -0
  119. data/examples/webshops/amazon/002-8212888-3924065_files/stars-4-0.gif +0 -0
  120. data/examples/webshops/amazon/002-8212888-3924065_files/stars-4-5.gif +0 -0
  121. data/examples/webshops/amazon/002-8212888-3924065_files/stars-5-0.gif +0 -0
  122. data/examples/webshops/amazon/002-8212888-3924065_files/tagline-adwidget.gif +0 -0
  123. data/examples/webshops/amazon/002-8212888-3924065_files/topnav-cart.gif +0 -0
  124. data/examples/webshops/amazon/002-8212888-3924065_files/transparent-pixel.gif +0 -0
  125. data/examples/webshops/amazon/002-8212888-3924065_files/transparent-pixel_002.gif +0 -0
  126. data/examples/webshops/amazon/test.rb +27 -0
  127. data/examples/webshops/amazon-online/test.rb +34 -0
  128. data/examples/webshops/barnes_and_noble/test.rb +32 -0
  129. data/examples/webshops/barnes_offline/barnes_and_noble.html +115 -0
  130. data/examples/webshops/barnes_offline/barnes_and_noble_files/10964080.gif +0 -0
  131. data/examples/webshops/barnes_offline/barnes_and_noble_files/10999676.gif +0 -0
  132. data/examples/webshops/barnes_offline/barnes_and_noble_files/11018492.gif +0 -0
  133. data/examples/webshops/barnes_offline/barnes_and_noble_files/11656534.gif +0 -0
  134. data/examples/webshops/barnes_offline/barnes_and_noble_files/11985045.gif +0 -0
  135. data/examples/webshops/barnes_offline/barnes_and_noble_files/12052378.gif +0 -0
  136. data/examples/webshops/barnes_offline/barnes_and_noble_files/12138286.gif +0 -0
  137. data/examples/webshops/barnes_offline/barnes_and_noble_files/12533212.gif +0 -0
  138. data/examples/webshops/barnes_offline/barnes_and_noble_files/12533268.gif +0 -0
  139. data/examples/webshops/barnes_offline/barnes_and_noble_files/9583392.gif +0 -0
  140. data/examples/webshops/barnes_offline/barnes_and_noble_files/SearchProduct.css +626 -0
  141. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin3_gtpointup.gif +0 -0
  142. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_aboutshipping.gif +0 -0
  143. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_account.gif +0 -0
  144. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_colon.gif +0 -0
  145. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_giftreminder.gif +0 -0
  146. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_help.gif +0 -0
  147. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_orderstatus.gif +0 -0
  148. data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_wishlist.gif +0 -0
  149. data/examples/webshops/barnes_offline/barnes_and_noble_files/bg.gif +0 -0
  150. data/examples/webshops/barnes_offline/barnes_and_noble_files/btnGoGrn.gif +0 -0
  151. data/examples/webshops/barnes_offline/barnes_and_noble_files/cleardot.gif +0 -0
  152. data/examples/webshops/barnes_offline/barnes_and_noble_files/cleardot_002.gif +0 -0
  153. data/examples/webshops/barnes_offline/barnes_and_noble_files/dot4.gif +0 -0
  154. data/examples/webshops/barnes_offline/barnes_and_noble_files/dotGold20.gif +0 -0
  155. data/examples/webshops/barnes_offline/barnes_and_noble_files/hdCantFind.gif +0 -0
  156. data/examples/webshops/barnes_offline/barnes_and_noble_files/hdSearchResults.gif +0 -0
  157. data/examples/webshops/barnes_offline/barnes_and_noble_files/hgg_tab_home_cold.gif +0 -0
  158. data/examples/webshops/barnes_offline/barnes_and_noble_files/hgg_tab_toy_cold.gif +0 -0
  159. data/examples/webshops/barnes_offline/barnes_and_noble_files/iframeKMP.js +172 -0
  160. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2.html +25 -0
  161. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/070226_mc_lnav_search.gif +0 -0
  162. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/XmlUtil.js +199 -0
  163. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/XslStyleSheet.js +1 -0
  164. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/kmp_gen.css +81 -0
  165. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/product-preview-core.js +337 -0
  166. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/product-preview.css +36 -0
  167. data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/productpreview.js +11 -0
  168. data/examples/webshops/barnes_offline/barnes_and_noble_files/linePagination.gif +0 -0
  169. data/examples/webshops/barnes_offline/barnes_and_noble_files/logo_bn05.gif +0 -0
  170. data/examples/webshops/barnes_offline/barnes_and_noble_files/navbar.js +34 -0
  171. data/examples/webshops/barnes_offline/barnes_and_noble_files/navbar_06.css +136 -0
  172. data/examples/webshops/barnes_offline/barnes_and_noble_files/popup_open.js +116 -0
  173. data/examples/webshops/barnes_offline/barnes_and_noble_files/qsearch3_vline_dots.gif +0 -0
  174. data/examples/webshops/barnes_offline/barnes_and_noble_files/qsearch4_search.gif +0 -0
  175. data/examples/webshops/barnes_offline/barnes_and_noble_files/qsearch_AdvSearch.jpg +0 -0
  176. data/examples/webshops/barnes_offline/barnes_and_noble_files/subnav_colon.gif +0 -0
  177. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_Bookclubs_cold.gif +0 -0
  178. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_bnjr_cold.gif +0 -0
  179. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_books_hot.gif +0 -0
  180. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_dvd_cold.gif +0 -0
  181. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_giftcards_cold.gif +0 -0
  182. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_home_cold.gif +0 -0
  183. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_member_cc_cold.gif +0 -0
  184. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_music_cold.gif +0 -0
  185. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_pipe.gif +0 -0
  186. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_textbooksonly_cold.gif +0 -0
  187. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_usedoop_cold.gif +0 -0
  188. data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_videogames_cold.gif +0 -0
  189. data/examples/webshops/barnes_offline/barnes_and_noble_files/toppromo3_rule.gif +0 -0
  190. data/examples/webshops/barnes_offline/barnes_and_noble_files/toppromo_fastfree05.gif +0 -0
  191. data/examples/webshops/barnes_offline/barnes_and_noble_files/vcart_btn_checkout.gif +0 -0
  192. data/examples/webshops/barnes_offline/barnes_and_noble_files/vcart_icon_cart.gif +0 -0
  193. data/examples/webshops/barnes_offline/barnes_and_noble_files/vcart_topbot_rule.gif +0 -0
  194. data/examples/webshops/barnes_offline/barnes_and_noble_files/visualcart_prodid.js +401 -0
  195. data/examples/webshops/barnes_offline/test.rb +30 -0
  196. data/examples/webshops/buydig/2_files/03AA1BB9089A4A6A92CF23F280D664EB.jpg +0 -0
  197. data/examples/webshops/buydig/2_files/1008.gif +0 -0
  198. data/examples/webshops/buydig/2_files/1013.gif +0 -0
  199. data/examples/webshops/buydig/2_files/1020.gif +0 -0
  200. data/examples/webshops/buydig/2_files/106CF2FB84B446518397517C3E6D5AD8.jpg +0 -0
  201. data/examples/webshops/buydig/2_files/13-www.gif +0 -0
  202. data/examples/webshops/buydig/2_files/1E9BB2E56AB145FC9D6EF952703AF476.jpg +0 -0
  203. data/examples/webshops/buydig/2_files/1FCDFBE85CDB4D429EC2C8CB24D20457.jpg +0 -0
  204. data/examples/webshops/buydig/2_files/1pix.gif +0 -0
  205. data/examples/webshops/buydig/2_files/2014.gif +0 -0
  206. data/examples/webshops/buydig/2_files/2089.gif +0 -0
  207. data/examples/webshops/buydig/2_files/24992_medal.gif +0 -0
  208. data/examples/webshops/buydig/2_files/24BBCBA1397F4DDCBBBBE8456D6D6E5B.jpg +0 -0
  209. data/examples/webshops/buydig/2_files/281F8A6019B140F38DFD45EB7B69B0FB.jpg +0 -0
  210. data/examples/webshops/buydig/2_files/2975F866CB2149F7ACBC559C8E24E304.jpg +0 -0
  211. data/examples/webshops/buydig/2_files/316FC9256DC9460ABC3C5ECAF6C60286.jpg +0 -0
  212. data/examples/webshops/buydig/2_files/50569327D8B94252B95E449AE470E505.jpg +0 -0
  213. data/examples/webshops/buydig/2_files/519CDAB404FA4543B76B5F281468ACBF.jpg +0 -0
  214. data/examples/webshops/buydig/2_files/57D6146419A647BA89C96AF0B5CAB03C.jpg +0 -0
  215. data/examples/webshops/buydig/2_files/58E3F988E184448B8C0A59874AE123A8.jpg +0 -0
  216. data/examples/webshops/buydig/2_files/5E5B10197A4E4C9B9ECCD6309DBE4C54.jpg +0 -0
  217. data/examples/webshops/buydig/2_files/609A249177D04065B37B9161CB0BC92D.jpg +0 -0
  218. data/examples/webshops/buydig/2_files/676CEE8E53C2445982E991871B4DF613.jpg +0 -0
  219. data/examples/webshops/buydig/2_files/712BA08FAB524A31A76ABB9E2009FF8E.jpg +0 -0
  220. data/examples/webshops/buydig/2_files/734BD08D7A5049339393166491D09D21.jpg +0 -0
  221. data/examples/webshops/buydig/2_files/751E72B7003343248497FE6905F80787.jpg +0 -0
  222. data/examples/webshops/buydig/2_files/76493D4F02F14EF7B5886510604C7BB4.jpg +0 -0
  223. data/examples/webshops/buydig/2_files/79521E251278486DB29529C60C9D012A.jpg +0 -0
  224. data/examples/webshops/buydig/2_files/9C9AF82AC3B54BDC8C705278B50FDFD6.jpg +0 -0
  225. data/examples/webshops/buydig/2_files/BC3FD8307B9948FDB7EEF156D8629C37.jpg +0 -0
  226. data/examples/webshops/buydig/2_files/C0DD4574765047D1836F505E69DC8AE5.jpg +0 -0
  227. data/examples/webshops/buydig/2_files/C143F48515274A44B04F4B3E46306BD2.jpg +0 -0
  228. data/examples/webshops/buydig/2_files/C6B02E88F729464699DB275D140F4563.jpg +0 -0
  229. data/examples/webshops/buydig/2_files/CE334D6206DB4FA9AFDF339AEF0AF50F.jpg +0 -0
  230. data/examples/webshops/buydig/2_files/D66AE0DC865A4021AB300ED3A0C4CD11.jpg +0 -0
  231. data/examples/webshops/buydig/2_files/DEA2EC2093DC474D96B651068576DAE5.jpg +0 -0
  232. data/examples/webshops/buydig/2_files/F547677D83844042BF13A4BE6523BB50.jpg +0 -0
  233. data/examples/webshops/buydig/2_files/Rbbbonlineseal.gif +0 -0
  234. data/examples/webshops/buydig/2_files/TopSellers_bottom.gif +0 -0
  235. data/examples/webshops/buydig/2_files/TopSellers_ttl.gif +0 -0
  236. data/examples/webshops/buydig/2_files/addToFavorites_ttl.gif +0 -0
  237. data/examples/webshops/buydig/2_files/banner_CorporateSales.gif +0 -0
  238. data/examples/webshops/buydig/2_files/banner_Shipping.gif +0 -0
  239. data/examples/webshops/buydig/2_files/bizratehonoree.gif +0 -0
  240. data/examples/webshops/buydig/2_files/btn_submit.gif +0 -0
  241. data/examples/webshops/buydig/2_files/checkFlash.js +110 -0
  242. data/examples/webshops/buydig/2_files/checkFlash2.js +109 -0
  243. data/examples/webshops/buydig/2_files/cnetcertified.gif +0 -0
  244. data/examples/webshops/buydig/2_files/credPriceGrabber.gif +0 -0
  245. data/examples/webshops/buydig/2_files/credShopping.gif +0 -0
  246. data/examples/webshops/buydig/2_files/credential_paypal.gif +0 -0
  247. data/examples/webshops/buydig/2_files/credentials.gif +0 -0
  248. data/examples/webshops/buydig/2_files/dealtime.gif +0 -0
  249. data/examples/webshops/buydig/2_files/dvxstyle.css +754 -0
  250. data/examples/webshops/buydig/2_files/footer_021306_1_v1.gif +0 -0
  251. data/examples/webshops/buydig/2_files/func.js +132 -0
  252. data/examples/webshops/buydig/2_files/getseal +1 -0
  253. data/examples/webshops/buydig/2_files/help.gif +0 -0
  254. data/examples/webshops/buydig/2_files/home.gif +0 -0
  255. data/examples/webshops/buydig/2_files/java.js +155 -0
  256. data/examples/webshops/buydig/2_files/leftnv_help.gif +0 -0
  257. data/examples/webshops/buydig/2_files/logo.gif +0 -0
  258. data/examples/webshops/buydig/2_files/logo2.gif +0 -0
  259. data/examples/webshops/buydig/2_files/logo3.gif +0 -0
  260. data/examples/webshops/buydig/2_files/main.js +227 -0
  261. data/examples/webshops/buydig/2_files/mastercard_secured.gif +0 -0
  262. data/examples/webshops/buydig/2_files/newsBox_bkg.jpg +0 -0
  263. data/examples/webshops/buydig/2_files/newsBox_bottom.jpg +0 -0
  264. data/examples/webshops/buydig/2_files/newsBox_text.gif +0 -0
  265. data/examples/webshops/buydig/2_files/newsBox_ttl.jpg +0 -0
  266. data/examples/webshops/buydig/2_files/noimage75.gif +0 -0
  267. data/examples/webshops/buydig/2_files/orangeleftfrmbtm.gif +0 -0
  268. data/examples/webshops/buydig/2_files/pixel153.gif +0 -0
  269. data/examples/webshops/buydig/2_files/rightnv_bottom.gif +0 -0
  270. data/examples/webshops/buydig/2_files/search_btn_off.gif +0 -0
  271. data/examples/webshops/buydig/2_files/search_c1.gif +0 -0
  272. data/examples/webshops/buydig/2_files/search_c2.gif +0 -0
  273. data/examples/webshops/buydig/2_files/search_c3.gif +0 -0
  274. data/examples/webshops/buydig/2_files/search_c4.gif +0 -0
  275. data/examples/webshops/buydig/2_files/search_down.gif +0 -0
  276. data/examples/webshops/buydig/2_files/search_left.gif +0 -0
  277. data/examples/webshops/buydig/2_files/search_right.gif +0 -0
  278. data/examples/webshops/buydig/2_files/search_top.gif +0 -0
  279. data/examples/webshops/buydig/2_files/siteLinks_bottom.gif +0 -0
  280. data/examples/webshops/buydig/2_files/siteLinks_bullet.gif +0 -0
  281. data/examples/webshops/buydig/2_files/siteLinks_ttl.gif +0 -0
  282. data/examples/webshops/buydig/2_files/spacer.gif +0 -0
  283. data/examples/webshops/buydig/2_files/style.js +45 -0
  284. data/examples/webshops/buydig/2_files/styles.html +33 -0
  285. data/examples/webshops/buydig/2_files/track_orders.jpg +0 -0
  286. data/examples/webshops/buydig/2_files/urchin +534 -0
  287. data/examples/webshops/buydig/2_files/verified_by_visa.gif +0 -0
  288. data/examples/webshops/buydig/2_files/welcome.gif +0 -0
  289. data/examples/webshops/buydig/2_files/welcome_ttl.gif +0 -0
  290. data/examples/webshops/buydig/2_files/yahoologo.gif +0 -0
  291. data/examples/webshops/buydig/input.html +1194 -0
  292. data/examples/webshops/buydig/test.rb +31 -0
  293. data/examples/webshops/ebay/test.rb +32 -0
  294. data/examples/webshops/finewines_offline/_finewines.html +1739 -0
  295. data/examples/webshops/finewines_offline/_finewines_cut.html +371 -0
  296. data/examples/webshops/finewines_offline/_finewines_files/011064.jpg +0 -0
  297. data/examples/webshops/finewines_offline/_finewines_files/012674.jpg +0 -0
  298. data/examples/webshops/finewines_offline/_finewines_files/013268.jpg +0 -0
  299. data/examples/webshops/finewines_offline/_finewines_files/013300.jpg +0 -0
  300. data/examples/webshops/finewines_offline/_finewines_files/013409.jpg +0 -0
  301. data/examples/webshops/finewines_offline/_finewines_files/014340.jpg +0 -0
  302. data/examples/webshops/finewines_offline/_finewines_files/015073.jpg +0 -0
  303. data/examples/webshops/finewines_offline/_finewines_files/015255.jpg +0 -0
  304. data/examples/webshops/finewines_offline/_finewines_files/015479.jpg +0 -0
  305. data/examples/webshops/finewines_offline/_finewines_files/015487.jpg +0 -0
  306. data/examples/webshops/finewines_offline/_finewines_files/017038.jpg +0 -0
  307. data/examples/webshops/finewines_offline/_finewines_files/017129.jpg +0 -0
  308. data/examples/webshops/finewines_offline/_finewines_files/017145.jpg +0 -0
  309. data/examples/webshops/finewines_offline/_finewines_files/017152.jpg +0 -0
  310. data/examples/webshops/finewines_offline/_finewines_files/017285.jpg +0 -0
  311. data/examples/webshops/finewines_offline/_finewines_files/017392.jpg +0 -0
  312. data/examples/webshops/finewines_offline/_finewines_files/017400.jpg +0 -0
  313. data/examples/webshops/finewines_offline/_finewines_files/019778.jpg +0 -0
  314. data/examples/webshops/finewines_offline/_finewines_files/019786.jpg +0 -0
  315. data/examples/webshops/finewines_offline/_finewines_files/020503.jpg +0 -0
  316. data/examples/webshops/finewines_offline/_finewines_files/021253.jpg +0 -0
  317. data/examples/webshops/finewines_offline/_finewines_files/021279.jpg +0 -0
  318. data/examples/webshops/finewines_offline/_finewines_files/021337.jpg +0 -0
  319. data/examples/webshops/finewines_offline/_finewines_files/021352.jpg +0 -0
  320. data/examples/webshops/finewines_offline/_finewines_files/023002.jpg +0 -0
  321. data/examples/webshops/finewines_offline/_finewines_files/023135.jpg +0 -0
  322. data/examples/webshops/finewines_offline/_finewines_files/023143.jpg +0 -0
  323. data/examples/webshops/finewines_offline/_finewines_files/023788.jpg +0 -0
  324. data/examples/webshops/finewines_offline/_finewines_files/024166.jpg +0 -0
  325. data/examples/webshops/finewines_offline/_finewines_files/024182.jpg +0 -0
  326. data/examples/webshops/finewines_offline/_finewines_files/024216.jpg +0 -0
  327. data/examples/webshops/finewines_offline/_finewines_files/027268.jpg +0 -0
  328. data/examples/webshops/finewines_offline/_finewines_files/027516.jpg +0 -0
  329. data/examples/webshops/finewines_offline/_finewines_files/027862.jpg +0 -0
  330. data/examples/webshops/finewines_offline/_finewines_files/028118.jpg +0 -0
  331. data/examples/webshops/finewines_offline/_finewines_files/028936.jpg +0 -0
  332. data/examples/webshops/finewines_offline/_finewines_files/033894.jpg +0 -0
  333. data/examples/webshops/finewines_offline/_finewines_files/033902.jpg +0 -0
  334. data/examples/webshops/finewines_offline/_finewines_files/033910.jpg +0 -0
  335. data/examples/webshops/finewines_offline/_finewines_files/033936.jpg +0 -0
  336. data/examples/webshops/finewines_offline/_finewines_files/033944.jpg +0 -0
  337. data/examples/webshops/finewines_offline/_finewines_files/033951.jpg +0 -0
  338. data/examples/webshops/finewines_offline/_finewines_files/034553.jpg +0 -0
  339. data/examples/webshops/finewines_offline/_finewines_files/034561.jpg +0 -0
  340. data/examples/webshops/finewines_offline/_finewines_files/232439.jpg +0 -0
  341. data/examples/webshops/finewines_offline/_finewines_files/237834.jpg +0 -0
  342. data/examples/webshops/finewines_offline/_finewines_files/268359.jpg +0 -0
  343. data/examples/webshops/finewines_offline/_finewines_files/289082.jpg +0 -0
  344. data/examples/webshops/finewines_offline/_finewines_files/331603.jpg +0 -0
  345. data/examples/webshops/finewines_offline/_finewines_files/369686.jpg +0 -0
  346. data/examples/webshops/finewines_offline/_finewines_files/420257.jpg +0 -0
  347. data/examples/webshops/finewines_offline/_finewines_files/422014.jpg +0 -0
  348. data/examples/webshops/finewines_offline/_finewines_files/460410.jpg +0 -0
  349. data/examples/webshops/finewines_offline/_finewines_files/480533.jpg +0 -0
  350. data/examples/webshops/finewines_offline/_finewines_files/556795.jpg +0 -0
  351. data/examples/webshops/finewines_offline/_finewines_files/597054.jpg +0 -0
  352. data/examples/webshops/finewines_offline/_finewines_files/650606.jpg +0 -0
  353. data/examples/webshops/finewines_offline/_finewines_files/652628.jpg +0 -0
  354. data/examples/webshops/finewines_offline/_finewines_files/653790.jpg +0 -0
  355. data/examples/webshops/finewines_offline/_finewines_files/658450.jpg +0 -0
  356. data/examples/webshops/finewines_offline/_finewines_files/660027.jpg +0 -0
  357. data/examples/webshops/finewines_offline/_finewines_files/660951.jpg +0 -0
  358. data/examples/webshops/finewines_offline/_finewines_files/684514.jpg +0 -0
  359. data/examples/webshops/finewines_offline/_finewines_files/685131.jpg +0 -0
  360. data/examples/webshops/finewines_offline/_finewines_files/686865.jpg +0 -0
  361. data/examples/webshops/finewines_offline/_finewines_files/699330.jpg +0 -0
  362. data/examples/webshops/finewines_offline/_finewines_files/703017.jpg +0 -0
  363. data/examples/webshops/finewines_offline/_finewines_files/703140.jpg +0 -0
  364. data/examples/webshops/finewines_offline/_finewines_files/703850.jpg +0 -0
  365. data/examples/webshops/finewines_offline/_finewines_files/717306.jpg +0 -0
  366. data/examples/webshops/finewines_offline/_finewines_files/900274.jpg +0 -0
  367. data/examples/webshops/finewines_offline/_finewines_files/938225.jpg +0 -0
  368. data/examples/webshops/finewines_offline/_finewines_files/947440.jpg +0 -0
  369. data/examples/webshops/finewines_offline/_finewines_files/951319.jpg +0 -0
  370. data/examples/webshops/finewines_offline/_finewines_files/967893.jpg +0 -0
  371. data/examples/webshops/finewines_offline/_finewines_files/981407.jpg +0 -0
  372. data/examples/webshops/finewines_offline/_finewines_files/981613.jpg +0 -0
  373. data/examples/webshops/finewines_offline/_finewines_files/982421.jpg +0 -0
  374. data/examples/webshops/finewines_offline/_finewines_files/985598.jpg +0 -0
  375. data/examples/webshops/finewines_offline/_finewines_files/986737.jpg +0 -0
  376. data/examples/webshops/finewines_offline/_finewines_files/987503.jpg +0 -0
  377. data/examples/webshops/finewines_offline/_finewines_files/992800.jpg +0 -0
  378. data/examples/webshops/finewines_offline/_finewines_files/VintageslogoEN.gif +0 -0
  379. data/examples/webshops/finewines_offline/_finewines_files/blanc-up.gif +0 -0
  380. data/examples/webshops/finewines_offline/_finewines_files/btn_vintages_latest.gif +0 -0
  381. data/examples/webshops/finewines_offline/_finewines_files/cc_en.gif +0 -0
  382. data/examples/webshops/finewines_offline/_finewines_files/common.js +860 -0
  383. data/examples/webshops/finewines_offline/_finewines_files/drink.gif +0 -0
  384. data/examples/webshops/finewines_offline/_finewines_files/drinkhold.gif +0 -0
  385. data/examples/webshops/finewines_offline/_finewines_files/ec_en.gif +0 -0
  386. data/examples/webshops/finewines_offline/_finewines_files/ev_en.gif +0 -0
  387. data/examples/webshops/finewines_offline/_finewines_files/hold.gif +0 -0
  388. data/examples/webshops/finewines_offline/_finewines_files/index-wines-features.jpg +0 -0
  389. data/examples/webshops/finewines_offline/_finewines_files/indexSTYLE.css +398 -0
  390. data/examples/webshops/finewines_offline/_finewines_files/keyword_search.gif +0 -0
  391. data/examples/webshops/finewines_offline/_finewines_files/mm_menu.js +1 -0
  392. data/examples/webshops/finewines_offline/_finewines_files/nr_en.gif +0 -0
  393. data/examples/webshops/finewines_offline/_finewines_files/ontario_en.gif +0 -0
  394. data/examples/webshops/finewines_offline/_finewines_files/popup.js +81 -0
  395. data/examples/webshops/finewines_offline/_finewines_files/releases_nav.js +229 -0
  396. data/examples/webshops/finewines_offline/_finewines_files/so_en.gif +0 -0
  397. data/examples/webshops/finewines_offline/_finewines_files/spacer.gif +0 -0
  398. data/examples/webshops/finewines_offline/_finewines_files/top.gif +0 -0
  399. data/examples/webshops/finewines_offline/_finewines_files/urchin.js +576 -0
  400. data/examples/webshops/finewines_offline/_finewines_files/wom_en.gif +0 -0
  401. data/examples/webshops/finewines_offline/test.rb +30 -0
  402. data/examples/webshops/us1camera/1_files/1pix.gif +0 -0
  403. data/examples/webshops/us1camera/1_files/1pix_002.gif +0 -0
  404. data/examples/webshops/us1camera/1_files/CnetCertified.gif +0 -0
  405. data/examples/webshops/us1camera/1_files/CyberSource.gif +0 -0
  406. data/examples/webshops/us1camera/1_files/Images50.gif +0 -0
  407. data/examples/webshops/us1camera/1_files/Images50_002.gif +0 -0
  408. data/examples/webshops/us1camera/1_files/Images50_003.gif +0 -0
  409. data/examples/webshops/us1camera/1_files/Images50_004.gif +0 -0
  410. data/examples/webshops/us1camera/1_files/Images50_005.gif +0 -0
  411. data/examples/webshops/us1camera/1_files/Images50_006.gif +0 -0
  412. data/examples/webshops/us1camera/1_files/PriceGrabber.gif +0 -0
  413. data/examples/webshops/us1camera/1_files/QSearch.gif +0 -0
  414. data/examples/webshops/us1camera/1_files/ban-m.jpg +0 -0
  415. data/examples/webshops/us1camera/1_files/banner1.bin +0 -0
  416. data/examples/webshops/us1camera/1_files/banner3.bin +0 -0
  417. data/examples/webshops/us1camera/1_files/block1.jpg +0 -0
  418. data/examples/webshops/us1camera/1_files/block2.jpg +0 -0
  419. data/examples/webshops/us1camera/1_files/block3.jpg +0 -0
  420. data/examples/webshops/us1camera/1_files/block4.jpg +0 -0
  421. data/examples/webshops/us1camera/1_files/block5.jpg +0 -0
  422. data/examples/webshops/us1camera/1_files/block6.jpg +0 -0
  423. data/examples/webshops/us1camera/1_files/bos.js +280 -0
  424. data/examples/webshops/us1camera/1_files/box1.jpg +0 -0
  425. data/examples/webshops/us1camera/1_files/box2.jpg +0 -0
  426. data/examples/webshops/us1camera/1_files/box3.jpg +0 -0
  427. data/examples/webshops/us1camera/1_files/box4.jpg +0 -0
  428. data/examples/webshops/us1camera/1_files/dot.jpg +0 -0
  429. data/examples/webshops/us1camera/1_files/eDevix.gif +0 -0
  430. data/examples/webshops/us1camera/1_files/electronics1.jpg +0 -0
  431. data/examples/webshops/us1camera/1_files/getseal +1 -0
  432. data/examples/webshops/us1camera/1_files/pride.jpg +0 -0
  433. data/examples/webshops/us1camera/1_files/search.jpg +0 -0
  434. data/examples/webshops/us1camera/1_files/sidebutton.jpg +0 -0
  435. data/examples/webshops/us1camera/1_files/sslroilogic.js +49 -0
  436. data/examples/webshops/us1camera/1_files/style.css +1 -0
  437. data/examples/webshops/us1camera/1_files/tl.html +2 -0
  438. data/examples/webshops/us1camera/input.html +548 -0
  439. data/examples/webshops/us1camera/test.rb +37 -0
  440. data/lib/scrubyt/core/navigation/agents/firewatir.rb +285 -0
  441. data/lib/scrubyt/core/navigation/agents/mechanize.rb +315 -0
  442. data/lib/scrubyt/core/navigation/fetch_action.rb +63 -0
  443. data/lib/scrubyt/core/navigation/navigation_actions.rb +107 -0
  444. data/lib/scrubyt/core/scraping/compound_example.rb +30 -0
  445. data/lib/scrubyt/core/scraping/constraint.rb +169 -0
  446. data/lib/scrubyt/core/scraping/constraint_adder.rb +49 -0
  447. data/lib/scrubyt/core/scraping/filters/attribute_filter.rb +14 -0
  448. data/lib/scrubyt/core/scraping/filters/base_filter.rb +112 -0
  449. data/lib/scrubyt/core/scraping/filters/constant_filter.rb +9 -0
  450. data/lib/scrubyt/core/scraping/filters/detail_page_filter.rb +37 -0
  451. data/lib/scrubyt/core/scraping/filters/download_filter.rb +64 -0
  452. data/lib/scrubyt/core/scraping/filters/html_subtree_filter.rb +9 -0
  453. data/lib/scrubyt/core/scraping/filters/regexp_filter.rb +13 -0
  454. data/lib/scrubyt/core/scraping/filters/script_filter.rb +11 -0
  455. data/lib/scrubyt/core/scraping/filters/text_filter.rb +34 -0
  456. data/lib/scrubyt/core/scraping/filters/tree_filter.rb +138 -0
  457. data/lib/scrubyt/core/scraping/pattern.rb +359 -0
  458. data/lib/scrubyt/core/scraping/pre_filter_document.rb +14 -0
  459. data/lib/scrubyt/core/scraping/result_indexer.rb +90 -0
  460. data/lib/scrubyt/core/shared/extractor.rb +171 -0
  461. data/lib/scrubyt/logging.rb +154 -0
  462. data/lib/scrubyt/output/post_processor.rb +139 -0
  463. data/lib/scrubyt/output/result.rb +44 -0
  464. data/lib/scrubyt/output/result_dumper.rb +154 -0
  465. data/lib/scrubyt/output/result_node.rb +145 -0
  466. data/lib/scrubyt/output/scrubyt_result.rb +42 -0
  467. data/lib/scrubyt/utils/compound_example_lookup.rb +50 -0
  468. data/lib/scrubyt/utils/ruby_extensions.rb +85 -0
  469. data/lib/scrubyt/utils/shared_utils.rb +58 -0
  470. data/lib/scrubyt/utils/simple_example_lookup.rb +40 -0
  471. data/lib/scrubyt/utils/xpathutils.rb +202 -0
  472. data/lib/scrubyt.rb +53 -0
  473. data/pkg/scrubyt-0.4.31.gem +0 -0
  474. data/resources/allison/LICENSE +184 -0
  475. data/resources/allison/README +37 -0
  476. data/resources/allison/allison.css +301 -0
  477. data/resources/allison/allison.gif +0 -0
  478. data/resources/allison/allison.js +307 -0
  479. data/resources/allison/allison.rb +287 -0
  480. data/resources/allison/cache/BODY +588 -0
  481. data/resources/allison/cache/CLASS_INDEX +4 -0
  482. data/resources/allison/cache/CLASS_PAGE +1 -0
  483. data/resources/allison/cache/FILE_INDEX +4 -0
  484. data/resources/allison/cache/FILE_PAGE +1 -0
  485. data/resources/allison/cache/FONTS +1 -0
  486. data/resources/allison/cache/FR_INDEX_BODY +1 -0
  487. data/resources/allison/cache/IMGPATH +1 -0
  488. data/resources/allison/cache/INDEX +1 -0
  489. data/resources/allison/cache/JAVASCRIPT +307 -0
  490. data/resources/allison/cache/METHOD_INDEX +4 -0
  491. data/resources/allison/cache/METHOD_LIST +1 -0
  492. data/resources/allison/cache/SRC_PAGE +1 -0
  493. data/resources/allison/cache/STYLE +323 -0
  494. data/resources/allison/cache/URL +1 -0
  495. data/scrubyt.gemspec +609 -0
  496. data/test/blackbox_test.rb +60 -0
  497. data/test/blackbox_tests/basic/multi_root.expected.xml +8 -0
  498. data/test/blackbox_tests/basic/multi_root.rb +6 -0
  499. data/test/blackbox_tests/basic/simple.expected.xml +5 -0
  500. data/test/blackbox_tests/basic/simple.rb +5 -0
  501. data/test/blackbox_tests/basic/three_divs.html +12 -0
  502. data/test/blackbox_tests/detail_page/detail_page_1.html +7 -0
  503. data/test/blackbox_tests/detail_page/detail_page_2.html +7 -0
  504. data/test/blackbox_tests/detail_page/main_page_1.html +5 -0
  505. data/test/blackbox_tests/detail_page/main_page_2.html +6 -0
  506. data/test/blackbox_tests/detail_page/one_detail_page.expected.xml +7 -0
  507. data/test/blackbox_tests/detail_page/one_detail_page.rb +9 -0
  508. data/test/blackbox_tests/detail_page/two_detail_pages.expected.xml +12 -0
  509. data/test/blackbox_tests/detail_page/two_detail_pages.rb +9 -0
  510. data/test/blackbox_tests/next_page/next_page_link.expected.xml +11 -0
  511. data/test/blackbox_tests/next_page/next_page_link.rb +7 -0
  512. data/test/blackbox_tests/next_page/page_1.html +11 -0
  513. data/test/blackbox_tests/next_page/page_2.html +11 -0
  514. data/test/blackbox_tests/next_page/page_3.html +7 -0
  515. data/test/blackbox_tests/next_page/page_list_links.expected.xml +11 -0
  516. data/test/blackbox_tests/next_page/page_list_links.rb +7 -0
  517. data/test/blackbox_tests/next_page/page_list_links.tofix +7 -0
  518. data/todo/backlog.txt +73 -0
  519. data/todo/scenario_ideas.txt +19 -0
  520. metadata +637 -0
@@ -0,0 +1,16 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ event_data = Scrubyt::Extractor.define do
6
+ fetch File.join(File.dirname(__FILE__), "input.html")
7
+
8
+ event do
9
+ title 'Frühlingsgefühle'
10
+ begin_time '22.00'
11
+ admission_fee '4,00'
12
+ end
13
+ end
14
+
15
+ event_data.to_xml.write($stdout, 1)
16
+ Scrubyt::ResultDumper.print_statistics(event_data)
@@ -0,0 +1,22 @@
1
+ <html>
2
+ <body>
3
+ <div>
4
+ abc1
5
+ <i>
6
+ def1
7
+ </i>
8
+ </div>
9
+ <div>
10
+ abc2
11
+ <i>
12
+ def2
13
+ </i>
14
+ </div>
15
+ <div>
16
+ abc3
17
+ <i>
18
+ def3
19
+ </i>
20
+ </div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,14 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ event_data = Scrubyt::Extractor.define do
6
+ fetch File.join(File.dirname(__FILE__), "input.html")
7
+
8
+ group do
9
+ e1 'f1'
10
+ end
11
+ end
12
+
13
+ event_data.to_xml.write($stdout, 1)
14
+ Scrubyt::ResultDumper.print_statistics(event_data)
@@ -0,0 +1,11 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../..lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ compo_data = Scrubyt::Extractor.define do
6
+ fetch(File.join(File.dirname(__FILE__),'tricky_compound.html'))
7
+
8
+ para({:contains => '4, 5, 6', :begins_with => '3', :ends_with => '6'}, :generalize => false)
9
+ end
10
+
11
+ compo_data.to_xml.write($stdout,1)
@@ -0,0 +1,9 @@
1
+ <html>
2
+ <body>
3
+ <table>
4
+ <tr><td>1, 2, 3, 4, <b>5, 6,</b> 7, 8</td></tr>
5
+ <tr><td>3, 4, <b>5, 6,</b> 7</td></tr>
6
+ <tr><td>3, 4, 5, 6</td></tr>
7
+ </table>
8
+ </body>
9
+ </html>
@@ -0,0 +1,17 @@
1
+ <html>
2
+ <body>
3
+ <table>
4
+ <tr>
5
+ <td>
6
+ This is a phone number: 123-456-78. It's a dummy phone no.
7
+ </td>
8
+ <td>
9
+ Another dummy phone number: 111-222-333. Really dummy.
10
+ </td>
11
+ <td>
12
+ And for the users of scRUBYt!, yet another dumb fake-phone no: 111-111-111-111. Enough examples for now.
13
+ </td>
14
+ </tr>
15
+ </table>
16
+ </body>
17
+ </html>
@@ -0,0 +1,11 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../..lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ compo_data = Scrubyt::Extractor.define do
6
+ fetch(File.join(File.dirname(__FILE__),'regexp_compound.html'))
7
+
8
+ para({:contains => /11\d+/}, :generalize => false)
9
+ end
10
+
11
+ compo_data.to_xml.write($stdout,1)
@@ -0,0 +1,5 @@
1
+ <html>
2
+ <body>
3
+ <p>Time to go, <b>said</b> Jack</p>
4
+ </body>
5
+ </html>
@@ -0,0 +1,11 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ compo_data = Scrubyt::Extractor.define do
6
+ fetch(File.join(File.dirname(__FILE__),'compound.html'))
7
+
8
+ para({:contains => 'said'}, :generalize => false)
9
+ end
10
+
11
+ compo_data.to_xml.write($stdout,1)
@@ -0,0 +1,6 @@
1
+ <html>
2
+ <body>
3
+ <p>Here is one detail paragraph!</p>
4
+ <p>Yet another annoying paragraph</p>
5
+ </body>
6
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+ <body>
3
+ <table style='border :1px solid black' cellpadding=2 cellspacing=2>
4
+ <tr><td>This is some text</td></tr>
5
+ <tr><td>This is some more nonsense text</td></tr>
6
+ <tr><td>And here is the detail link: <a href='detailpage.html'>detail link!</a></td></tr>
7
+ </table>
8
+ </body>
9
+ </html>
@@ -0,0 +1,17 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ result = Scrubyt::Extractor.define do
6
+ fetch 'index.html'
7
+
8
+ stuff 'detail link!' do
9
+ stuff_detail do
10
+ other_stuff 'Here is one detail paragraph!'
11
+ end
12
+ end
13
+
14
+ end
15
+
16
+ puts result.to_xml
17
+ result.export('test')
@@ -0,0 +1,39 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #The compulsory google example :)
6
+ #Don't you have the feeling that a google.com example in web programming
7
+ #is becoming something like 'Hello World' in desktop programming?
8
+ #
9
+ #Example of:
10
+ # - filling and submitting a textfield
11
+ # - using a href attribute
12
+ # - recursively crawling to the next page(s)
13
+ #
14
+ #Goal: Go to google.com. Enter 'ruby' into the search textfield and
15
+ # submit the form. Extract the url of the first 20 pages.
16
+ #Solution: Use the navigational commands 'fetch', 'fill_textfield', 'submit'
17
+ # to navigate to the page of interest. There, extract the links with
18
+ # the pattern 'link'. The URLs should be extracted with 'link''s child
19
+ # pattern, 'url' which is an attribute pattern.
20
+ # This will extract the first 10 results, but you need the first 20.
21
+ # To achieve this, the 'next_page' idiom should be used, with :limit set
22
+ # to 2.
23
+
24
+ google_data = Scrubyt::Extractor.define do
25
+ #Perform the action(s)
26
+ fetch 'http://www.google.com/ncr'
27
+ fill_textfield 'q', 'ruby'
28
+ submit
29
+ #Construct the wrapper
30
+ link "Ruby Programming Language" do
31
+ url "href", :type => :attribute
32
+ end
33
+ next_page "Next", :limit => 2
34
+ end
35
+
36
+ google_data.to_xml.write($stdout, 1)
37
+ Scrubyt::ResultDumper.print_statistics(google_data)
38
+
39
+
@@ -0,0 +1,12 @@
1
+ require("rubygems")
2
+ require("scrubyt")
3
+
4
+ data = Scrubyt::Extractor.define do
5
+ fetch("input.html")
6
+
7
+ stuff("/html[1]/body[1]/table[1]/tr[2]/td[1]", { :generalize => false }) do
8
+ index("index", { :type => :attribute })
9
+ end
10
+ end
11
+
12
+ data.to_xml.write($stdout, 1)
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <body>
3
+ <table>
4
+ <tr>
5
+ <td index="1">Identical example</td>
6
+ <td index="2">Identical example</td>
7
+ </tr>
8
+ <tr>
9
+ <td index="3">Identical example</td>
10
+ <td index="4">Identical example</td>
11
+ </tr>
12
+ </table>
13
+ <p index="5">Identical example</p>
14
+ </body>
15
+ </html>
16
+
@@ -0,0 +1,15 @@
1
+ $: << File.join(File.dirname(__FILE__), '../../../lib')
2
+ require 'scrubyt'
3
+ include Scrubyt
4
+
5
+ data = Extractor.define do
6
+ fetch 'input.html'
7
+
8
+ stuff 'Identical example[2]', :generalize => false do
9
+ index 'index', :type => :attribute
10
+ end
11
+ end
12
+
13
+
14
+ data.to_xml.write($stdout,1)
15
+ data.export(__FILE__)
@@ -0,0 +1,10 @@
1
+ require("rubygems")
2
+ require("scrubyt")
3
+
4
+ data = Scrubyt::Extractor.define do
5
+ fetch("input.html")
6
+
7
+ stuff("/html/body/table/tr/td", { :generalize => true })
8
+ end
9
+
10
+ data.to_xml.write($stdout, 1)
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <body>
3
+ <table>
4
+ <tr>
5
+ <td index="1">Identical example</td>
6
+ <td index="2">Identical example</td>
7
+ </tr>
8
+ <tr>
9
+ <td index="3">Identical example</td>
10
+ <td index="4">Identical example</td>
11
+ </tr>
12
+ </table>
13
+ <p index="5">Identical example</p>
14
+ </body>
15
+ </html>
16
+
@@ -0,0 +1,14 @@
1
+ $: << File.join(File.dirname(__FILE__), '../../../lib')
2
+ require 'scrubyt'
3
+ include Scrubyt
4
+
5
+ data = Extractor.define do
6
+ fetch 'input.html'
7
+
8
+ stuff 'Identical example/@index'#, :generalize => false
9
+ end
10
+
11
+
12
+ data.to_xml.write($stdout,1)
13
+ data.show_stats
14
+ data.export(__FILE__)
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <body>
3
+ <div>we would not like to match this div.
4
+ <p>However, we would like to match this paragraph, and also the following span: <span><b>hi there!</b></span></p>
5
+ </div>
6
+ </body>
7
+ </html>
@@ -0,0 +1,22 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #Example of:
6
+ #Goal:
7
+ #Solution:
8
+
9
+ multiple_example_data = Scrubyt::Extractor.define do
10
+ fetch File.join(File.dirname(__FILE__), "input.html")
11
+
12
+ first_info 'However, we would like to match this paragraph, and also the following span: ' do
13
+ additional_info 'hi there!'
14
+ end
15
+ end
16
+
17
+ multiple_example_data.to_xml.write($stdout, 1)
18
+ multiple_example_data.export(__FILE__)
19
+ Scrubyt::ResultDumper.print_statistics(multiple_example_data)
20
+
21
+
22
+
@@ -0,0 +1,42 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+ require 'scrubyt/output/result_dumper'
5
+
6
+ #Example of: Using the next_page command with onclick='' hrefs.
7
+
8
+ ### Doesn't work, as next_page doesn't click links
9
+ data = Scrubyt::Extractor.define(:agent => :firefox) do
10
+ fetch("file://"+File.expand_path(File.join(File.dirname(__FILE__), "page_1.html")))
11
+
12
+ entry '//div'
13
+
14
+ next_page 'Next'
15
+ end
16
+
17
+ puts "First results :"
18
+ puts data.to_xml
19
+
20
+ puts "---------------"
21
+
22
+ ### Doesn't work, all the results are the same :(
23
+
24
+ data = Scrubyt::Extractor.define(:agent => :firefox) do
25
+ fetch("file://"+File.expand_path(File.join(File.dirname(__FILE__), "page_1.html")))
26
+
27
+ while(true)
28
+ entry '//div'
29
+
30
+ begin
31
+ click_link 'Next'
32
+ rescue Watir::Exception::UnknownObjectException
33
+ puts "Reached the end. Breaking"
34
+ break
35
+ end
36
+ end
37
+ end
38
+ puts "Second results:"
39
+ puts data.to_xml
40
+
41
+
42
+
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <body>
3
+ <div>1</div>
4
+ <div>2</div>
5
+ <div>3</div>
6
+ <form id='nextPage' action='page_2.html'>
7
+ <a onclick='document.getElementById("nextPage").submit(); return false' href="#">Next</a>
8
+ </form>
9
+ </body>
10
+ </html>
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <body>
3
+ <div>4</div>
4
+ <div>5</div>
5
+ <div>6</div>
6
+ <form id='nextPage' action='page_3.html'>
7
+ <a onclick='document.getElementById("nextPage").submit(); return false' href="#">Next</a>
8
+ </form>
9
+ </body>
10
+ </html>
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <body>
3
+ <div>7</div>
4
+ <div>8</div>
5
+ <div>9</div>
6
+ </body>
7
+ </html>
@@ -0,0 +1,29 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #Example of: Collecting blog addresses from rubycorner.com
6
+ # - extracting href attribute from an <a> tag
7
+ # - crawling to all of the pages
8
+ #
9
+ #Goal: Go to http://rubycorner.com/blogs/lang/en. This listing
10
+ # contains all the English blogs aggregated by rubycorner.
11
+ # Scrape all of them!
12
+ #Solution: Extract all <a> patterns as you would normally. To further
13
+ # extract the href from the 'link' pattern, use an attrinute
14
+ # pattern (specified by :type => :attribute)
15
+ # Finally, crawl to all of the pages with next_page - this time
16
+ # without a limit since we need all the pages.
17
+
18
+ rubycorner_data = Scrubyt::Extractor.define do
19
+ #Perform the action(s)
20
+ fetch 'http://rubycorner.com/blogs/lang/en'
21
+ #Construct the wrapper
22
+ link "Boston BarCamp Day 1" do
23
+ url "href", :type => :attribute
24
+ end
25
+ next_page ">"
26
+ end
27
+
28
+ rubycorner_data.to_xml.write($stdout, 1)
29
+ Scrubyt::ResultDumper.print_statistics(rubycorner_data)
@@ -0,0 +1,30 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #Example of: - logging to an account - rubyforge.org this time
6
+ # - submitting the form with a button
7
+ #
8
+ #Goal: Go to 'http://rubyforge.org/' and login. Once you are inside,
9
+ # scrape something not really interesting just to show you are in!
10
+ #Solution: Go to rubyforge.org and click on the 'Log In' link. This gets you to the
11
+ # login page, where you fill in the appropriate textfields.
12
+ # Submitting the textfield once everything is setup up for the show is a bit
13
+ # different this time - since a simple form.submit does not work. You have
14
+ # to submit the form by pressing a button. The solution is to specify the index
15
+ # of the button which should be pressed.
16
+
17
+ rubyforge_data = Scrubyt::Extractor.define do
18
+ fetch 'http://rubyforge.org/'
19
+ click_link 'Log In'
20
+ fill_textfield 'form_loginname', '*login_here*'
21
+ fill_textfield 'form_pw', '*pass_here*'
22
+ submit 0
23
+
24
+ stuff 'My Personal Page'
25
+
26
+ end
27
+
28
+ rubyforge_data.to_xml.write($stdout, 1)
29
+ Scrubyt::ResultDumper.print_statistics(rubyforge_data)
30
+
@@ -0,0 +1,17 @@
1
+ <html>
2
+ <body>
3
+ <table>
4
+ <tr>
5
+ <td>Ruby</td>
6
+ <tb>Python</tb>
7
+ </tr>
8
+ <tr>
9
+ <td><b>Java</b></td>
10
+ <td>C#</td>
11
+ </tr>
12
+ <tr>
13
+ </tr>
14
+ </table>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,37 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #Example of:
6
+ # - Sepecyfiing multiple examples
7
+ #
8
+ #Goal: From this simple table, scrape the languages and their rivals, into
9
+ # a structure like
10
+ #
11
+ # <language_war>
12
+ # <lang>Ruby</lang>
13
+ # <rival>Python</rival>
14
+ # </language_war>
15
+ #
16
+ # Try it as you would normally - i.e. just supply lang the example 'Ruby'
17
+ # and rival the example 'Python' and it won't work. This is because
18
+ # in the document, the other two semantically similar records (Java and
19
+ # C#) are contained at different places in the structure. This is a dummy
20
+ # example, but in the real life you have this with a lot of webshops
21
+ # and other pages as well.
22
+ #
23
+ #Solution: Specify multiple examples as in the example below - until you get
24
+ # everything you need (i.e. theoretically you can specify even
25
+ # 12345 examples, however that would be unmaintainable :-))
26
+
27
+ ambigous_data = Scrubyt::Extractor.define do
28
+ fetch File.join(File.dirname(__FILE__), "input.html")
29
+ #Construct the wrapper
30
+ language_war do
31
+ lang 'Ruby', 'Java'
32
+ rival 'Python', 'C#'
33
+ end
34
+ end
35
+
36
+ ambigous_data.to_xml.write($stdout, 1)
37
+ Scrubyt::ResultDumper.print_statistics(ambigous_data)
@@ -0,0 +1,15 @@
1
+ <html>
2
+ <body>
3
+ <table border=1 padding=10>
4
+ <tr>
5
+ <td>1, 2, 3</td>
6
+ <td>Vancouver, Quebec</td>
7
+ </tr>
8
+ <tr>
9
+ <td>London and Vienna and Prague</td>
10
+ <td>1, Spam, 3, Ham</td>
11
+ <td>Just a simple text cell</td>
12
+ </tr>
13
+ </table>
14
+ </body>
15
+ </html>
@@ -0,0 +1,25 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #Example of:
6
+ # - using a regexp pattern
7
+ #
8
+ #Goal: Extract the numbers one by one from the pattern 'cell'
9
+ #Solution: Add a regexp pattern to the pattern 'cell'.
10
+
11
+ table_data = Scrubyt::Extractor.define do
12
+ #Perform the action(s)
13
+ fetch File.join(File.dirname(__FILE__), "input.html")
14
+ #Construct the wrapper
15
+ table do
16
+ row :generalize => true do
17
+ cell '1, 2, 3', :generalize => true do
18
+ numbers /\d+/
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ table_data.to_xml.write($stdout, 1)
25
+ Scrubyt::ResultDumper.print_statistics(table_data)
@@ -0,0 +1,45 @@
1
+ <html>
2
+ <body>
3
+ <table>
4
+ <tr>
5
+ <td>The Matrix</td>
6
+ <td>Neo</td>
7
+ </tr>
8
+ <tr>
9
+ <td>Star Wars</td>
10
+ <td>Luke Skywalker</td>
11
+ </tr>
12
+ <tr>
13
+ <td>Garfield</td>
14
+ </tr>
15
+ <tr>
16
+ <td>Saw</td>
17
+ <td>Jigsaw</td>
18
+ </tr>
19
+ <tr>
20
+ <td>Pirates of the Caribbean</td>
21
+ <td><b>Jack Sparrow<b></td>
22
+ </tr>
23
+ <tr>
24
+ <td>Pirates of the Amazonas</td>
25
+ </tr>
26
+ <tr></tr>
27
+ <tr><td>Starsky & Hutch</td></tr>
28
+ <tr><h1>The coolest stuff</h1>
29
+ <td>Test cell</td>
30
+ <td>
31
+ <table>
32
+ <tr>
33
+ <td>Kill Bill</td>
34
+ <td>The Bride</td>
35
+ </tr>
36
+ <tr>
37
+ <td>Kill Bill, vol 2.</td>
38
+ <td>Beatrix Kiddo</td>
39
+ </tr>
40
+ </table>
41
+ </td>
42
+ </tr>
43
+ </table>
44
+ </body>
45
+ </html>
@@ -0,0 +1,30 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), '../../../../lib')
2
+
3
+ require 'scrubyt'
4
+
5
+ #Example of:
6
+ # - Sepecyfying multiple examples
7
+ # - Narrowig the results by requiring the presence of some patterns
8
+ #
9
+ #Goal: We want to extract all movies, containing their title and their
10
+ # main_character. Moreover, we need only those movies which
11
+ # have both the title and the main_character specified
12
+ #
13
+ #Solution: See the ambigous_records example on why to use multiple examples.
14
+ # Use the ensure_presence_of_pattern constraint to extract only
15
+ # those movies which have child patterns named 'title' and
16
+ # 'main_character'
17
+
18
+ table_data_comp = Scrubyt::Extractor.define do
19
+ #Perform the action(s)
20
+ fetch File.join(File.dirname(__FILE__), "input.html")
21
+ #Construct the wrapper
22
+ movie do
23
+ title 'The Matrix', 'Kill Bill'
24
+ main_character 'Neo', 'The Bride'
25
+ end.ensure_presence_of_pattern('title').
26
+ ensure_presence_of_pattern('main_character')
27
+ end
28
+
29
+ table_data_comp.to_xml.write($stdout, 1)
30
+ Scrubyt::ResultDumper.print_statistics(table_data_comp)
@@ -0,0 +1,20 @@
1
+ <html>
2
+ <body>
3
+ <table border=1 padding=10>
4
+ <tr>
5
+ <td>1</td>
6
+ <td>2</td>
7
+ <td>3</td>
8
+ <td>4</td>
9
+ <td>5</td>
10
+ <td>6</td>
11
+ <td>7</td>
12
+ <td>8</td>
13
+ <td>9</td>
14
+ <td>10</td>
15
+ <td>11</td>
16
+ <td>12</td>
17
+ </tr>
18
+ </table>
19
+ </body>
20
+ </html>