Web Scraping using Diazo!

5,252 views
5,166 views

Published on

Web Scraping using Diazo!

Talk given at the StarTechConf 2011
Santiago, Chile
www.startechconf.com

Published in: Technology
2 Comments
5 Likes
Statistics
Notes
  • Buen material no conocía el patrón de diseño o el nombre del concepto de diazo y deliverance ahora voy a explicar así mis clases sobre estas tecnologías gracias
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Ejemplo: http://www.screenr.com/uOZs
    Código:
    https://github.com/aaguirre/diazo.alma
    https://github.com/aaguirre/diazo.ipad
    https://github.com/aaguirre/diazo.iphone
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
5,252
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
20
Comments
2
Likes
5
Embeds 0
No embeds

No notes for slide

Web Scraping using Diazo!

  1. 1. Web Scraping @alvaro_aguirreSaturday, November 5, 2011
  2. 2. In search of our cosmic origins...Saturday, November 5, 2011
  3. 3. Saturday, November 5, 2011
  4. 4. Saturday, November 5, 2011
  5. 5. Saturday, November 5, 2011
  6. 6. Saturday, November 5, 2011
  7. 7. Saturday, November 5, 2011
  8. 8. Saturday, November 5, 2011
  9. 9. Data Scraping vs Web ScrapingSaturday, November 5, 2011
  10. 10. Data Scraping <html> <header></header> <body> ..... </body> </html>Saturday, November 5, 2011
  11. 11. Web ScrapingSaturday, November 5, 2011
  12. 12. Saturday, November 5, 2011
  13. 13. Saturday, November 5, 2011
  14. 14. Deliverance XDV DiazoSaturday, November 5, 2011
  15. 15. DiazoSaturday, November 5, 2011
  16. 16. Saturday, November 5, 2011
  17. 17. <replace css:content=”h1” css:theme=”#main” />Saturday, November 5, 2011
  18. 18. <drop css:content=”h1” /> <drop css:theme=”breadcrumbs” />Saturday, November 5, 2011
  19. 19. <replace css:theme=”#header” content=”#header- element” if-content=”” />Saturday, November 5, 2011
  20. 20. <drop css:theme="#info-box" if-path="/news"/>Saturday, November 5, 2011
  21. 21. <theme/> <notheme/> <replace/> <before/> <after/> <drop/> <strip/> <merge/> <copy/>Saturday, November 5, 2011
  22. 22. <replace css:theme="#details"> <dl id="details"> <xsl:for-each css:select="table#details > tr"> <dt><xsl:copy-of select="td[1]/text()" /></dt> <dd><xsl:copy-of select="td[2]/node()"/></dd> </xsl:for-each> </dl> </replace>/></dt> <table id="details"> <dl id="details"> <tr> <dt>One</dt> <td>One</td> <dd>1</dd> <td>1</td> <dt>Two</dt> </tr> <dd>2</dd> <tr> </dl> <td>Two</td> <td>2</td> </tr> </table>Saturday, November 5, 2011
  23. 23. Saturday, November 5, 2011
  24. 24. Saturday, November 5, 2011
  25. 25. Saturday, November 5, 2011
  26. 26. ToolsSaturday, November 5, 2011
  27. 27. External ContentSaturday, November 5, 2011
  28. 28. Saturday, November 5, 2011
  29. 29. • development of web & mobile interfaces • legacy apps integrations • prototypes • low couplingSaturday, November 5, 2011
  30. 30. from diazo.compiler import compile_theme from lxml import etree from diazo.compiler import compile_theme absolute_prefix = "/static" rules = "rules.xml" theme = "theme.html" compiled_theme = compile_theme(rules, theme, absolute_prefix=absolute_prefix) transform = etree.XSLT(compiled_theme) content = etree.parse(some_content) transformed = transform(content) output = etree.tostring(transformed)Saturday, November 5, 2011
  31. 31. github/aaguirreSaturday, November 5, 2011
  32. 32. diazo.orgSaturday, November 5, 2011
  33. 33. plone.orgSaturday, November 5, 2011
  34. 34. gracias!Saturday, November 5, 2011

×