Python---> Basic WebCrawle
#########################################################################################
####Autor: JoeontheRocks#######################################################################
####Basic Webcrawle###########################################################################
####http://joeontherocks.weebly.com################################################################
#########################################################################################
from urllib import urlopen #import library
def get_page(url): #open url
response = urlopen(url)
contenido_html = response.read()
return contenido_html
def get_next_target_group(page): # link filter
content_html = page
start_link = page.find('<a href=')
start_quote = page.find('www', start_link) # you can change this filter for------> start_quote = page.find('"', start_link)
end_link = page.find ('.com', start_quote) # ------> end_link = page.find ('"', start_quote)
url = page[start_quote: end_link + 4] # ------> url = page[start_quote + 1: end_link]
return url, end_link
return get_next_target_group(page)
def make_list(page): # links in to the list
lst = []
while True:
url, end_link = get_next_target_group(page)
if url:
lst.append(url)
page = page[end_link:]
else:
break
lst = list(set(lst)) # a little bit order
print lst
print 'Number of links is:'
print len(lst) # print the number of links in lst
def print_all_links_groups(page): # print all links in the url
while True:
url, end_link = get_next_target_group(page)
if url:
print url
page = page[end_link:]
break
#Please uncoment to use
make_list(get_page('https://www.yoururl.com')) # --------> introduce your url! order to make list with the links.
print_all_links_groups(get_page('https://www.yoururl.com')) #---------> introduce your url! order to print all links in the url.
####Autor: JoeontheRocks#######################################################################
####Basic Webcrawle###########################################################################
####http://joeontherocks.weebly.com################################################################
#########################################################################################
from urllib import urlopen #import library
def get_page(url): #open url
response = urlopen(url)
contenido_html = response.read()
return contenido_html
def get_next_target_group(page): # link filter
content_html = page
start_link = page.find('<a href=')
start_quote = page.find('www', start_link) # you can change this filter for------> start_quote = page.find('"', start_link)
end_link = page.find ('.com', start_quote) # ------> end_link = page.find ('"', start_quote)
url = page[start_quote: end_link + 4] # ------> url = page[start_quote + 1: end_link]
return url, end_link
return get_next_target_group(page)
def make_list(page): # links in to the list
lst = []
while True:
url, end_link = get_next_target_group(page)
if url:
lst.append(url)
page = page[end_link:]
else:
break
lst = list(set(lst)) # a little bit order
print lst
print 'Number of links is:'
print len(lst) # print the number of links in lst
def print_all_links_groups(page): # print all links in the url
while True:
url, end_link = get_next_target_group(page)
if url:
print url
page = page[end_link:]
break
#Please uncoment to use
make_list(get_page('https://www.yoururl.com')) # --------> introduce your url! order to make list with the links.
print_all_links_groups(get_page('https://www.yoururl.com')) #---------> introduce your url! order to print all links in the url.
Boceto de un juego.
Este es un boceto de un juego desarrollado en scratch.
El archivo es autoejecutable para windows.
Esta pensado para aquellos que deseen adquirir soltura con el teclado, algo basico si quieres programarcomolos profesionales.
Eliminen las letras que vayan apareciendo y cuando se cansen presionen escape.
Que se diviertan!
El archivo es autoejecutable para windows.
Esta pensado para aquellos que deseen adquirir soltura con el teclado, algo basico si quieres programarcomolos profesionales.
Eliminen las letras que vayan apareciendo y cuando se cansen presionen escape.
Que se diviertan!
letterstorm.exe | |
File Size: | 4994 kb |
File Type: | exe |