Skip to content

Commit

Permalink
Added a different URL to brain.py to make the encyclopedia ANT faster
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofsraam committed Oct 19, 2011
1 parent a00c938 commit 0348f9d
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 278 deletions.
5 changes: 2 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
TODO depcomp install-sh missing
TODO install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Expand Down
2 changes: 1 addition & 1 deletion brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def stripFromEnd(victim,x):
recieved += str(sys.argv[i]+" ")

query = urllib2.quote(recieved)
r = requests.get('http://en.wikipedia.org/wiki/Special:Export?search='+query+'&go=Go')
r = requests.get('http://en.wikipedia.org/w/index.php?title='+query+'&action=render')
html_content = r.content
first_paragraph = ""
for i in range(html_content.index("<p>"),html_content.index("</p>")):
Expand Down
Loading

0 comments on commit 0348f9d

Please sign in to comment.