Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
hakiour committed Oct 6, 2019
2 parents 4a9a21f + b269267 commit a86aa71
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
16 changes: 7 additions & 9 deletions linkDownload.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!C:/Users/sergi/AppData/Local/Programs/Python/Python37-32/python.exe
print("Content-Type: text/html\n")

from urllib.request import Request, urlopen
import re
Expand Down Expand Up @@ -56,6 +56,7 @@ def readLinks():
datosForm = cgi.FieldStorage()

if datosForm:
print("adasd")
url = datosForm["url"]
arrayUrl = (url.split("//"))
if len(arrayUrl) == 2:
Expand All @@ -79,18 +80,15 @@ def readLinks():

for link in arrayUrls[:-1]:
print("reading link: "+ link)
urlToList(link, "test"+str(i), urlSrc)
urlToList(link, "test"+str(i), url)
i+=1

else:
print('Error input')



#url = "https://www.elmundo.es/pais-vasco/2019/07/10/5d25f9af21efa0c0578b456f.html"
#urlToList(url,file)

readLinks()



#readLinks()
print("asd")
#map reduce para contar palabras
12 changes: 8 additions & 4 deletions web/assets/js/analizador.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ function mostrarLoader(){

function iniciarProceso(dominio, tematica) {
$.ajax({
url: "/../../../linkDownload.py",
url: "./linkDownload.py",
type: "POST",
cache: false,
data:{ "url":dominio, "tema": tematica},
success: function (response) {
$('#thenode').html(response);
}
alert(response)
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
}
});

}

0 comments on commit a86aa71

Please sign in to comment.