GithubHelp home page GithubHelp logo

crawler's People

Contributors

domoench avatar

Watchers

 avatar  avatar

crawler's Issues

ParseHtml is getting initialized with no etree

Issue can be seen by crawling http://www.hrc.utexas.edu/. Is thrown when trying to iterate through the etree, not during the etree's construction.

The reason the etree.HTML() actually returns None if it fails. In this instance if failed because it tried to parse a .qtl file as an HTML page.

Exception in thread Thread-14:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/Users/david/Desktop/env/webcrawler/crawlthread.py", line 37, in run
    page_data = self.processPage(url)
  File "/Users/david/Desktop/env/webcrawler/crawlthread.py", line 70, in processPage
    p = ParseHtml(url)
  File "/Users/david/Desktop/env/webcrawler/parseHtml.py", line 38, in __init__
    for e in self.root.iter('a'):
AttributeError: 'NoneType' object has no attribute 'iter'

Too Slow

Make it multithreaded so you aren't blocking on network I/O for such a large fraction of runtime.

lxml and Unicode Problems

One site that exposes the problem is thunderbirdcoffee.com.

ERROR: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.

Add Commandline Options

  • Ability to specify start point of crawling
  • Ability to specify a config file denoting subpaths to ignore. For example, maybe the path www.site.com/users/ if you don't care to crawl every user page in the domain.

Incorrect Relative to Absolute url conversion

For example:

On page http://cholula.com/recipes/drinks/ there is a link with a relative href of monterrey_martini.php.
Currently the conversion from relative to absolute produces http://cholula.com/monterrey_martini.php
It should produce http://cholula.com/recipes/drinks/monterrey_martini.php

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.