In the clj-tagsoup example it has the following line: (use 'pl.danieljanus.tagsoup)
The use function is like require, except it aliases the vars to the current namespace. So the pl.danieljanus.tagsoup is the namespace to use. If the README doesn't provide any clues, you can sometimes figure out the namespace to use by looking at the src directory in the repository. In the clj-tagsoup repository there's a file: src/pl/danieljanus/tagsoup.clj Which again indicates a namespace of pl.danieljanus.tagsoup. Just convert "/" to "." and "_" to "-", then remove the file extension to produce the namespace of the file. Crouton is an alternative HTML parsing library (that's coincidentally written by me) and can be found at: https://github.com/weavejester/crouton Crouton uses a slightly different output syntax, which is compatible with Clojure's xml zipper functions, making it more suitable for document searches and traversal (IMO). - James On 14 October 2015 at 19:16, Mike <m...@thefrederickhome.name> wrote: > Hello, > > For my first real Clojure project I am attempting to get an HTML page and > locate a particular *<input>* tag within the page. I have my program > GETting the page, but > I am having trouble parsing it. I am trying to use *clj-tagsoup* to > parse the page, but I get an error message when I try to ;require it as an > external reference. Here > are (what I think are) the pertinent segments of "code": > > *project.clj* file extract: > > :dependencies [ > [org.clojure/clojure "1.7.0"] > [clj-http "2.0.0"] > [clj-tagsoup "0.3.0"]] > > > > *source *file extract: > > (ns one.core > (:gen-class) > (:require [clj-http.client :as client]) > (:require [clj-tagsoup :as html])) > > > > I am using LightTable as my IDE; when I added the *clj-tagsoup* > dependency the next loading of my project did appear to go fetch the > required files. > > I have some questions: > > 1) I am using Windows 8.1 Pro, my project is located at > c:\Users\Michael\CLJ\one; I have LightTable loaded at > c:\LightTableWin\LightTable\LightTable.exe. > Where would I manually verify that the *clj-tagsoup* files have been > loaded? > > 2) *clj-tagsoup* didn't have an example of how to reference it in a : > *require* clause. Did I write this correctly, and how would I know if it > needed to be different? > > 3) Is this an appropriate approach? I noticed that *clj-http* has a > *parse-html* function, but when I call that I get an assert that says > that *crouton *is not present. > > Any answers or guidance appreciated. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.