spartakos87 / greek_sites_crawler

Programm which can crawl plenty of greek sites
GNU General Public License v3.0
14 stars 4 forks source link

slice indices must be integers or None or have an __index__ method** #3

Closed fkolokathi closed 7 years ago

fkolokathi commented 7 years ago

I run your program and I always take the following error for every website:

in alfavita(html) 1 def alfavita(html): ----> 2 topic = html.find("div",{"class":"field-item even"}).text 3 title = html.title.text 4 article = html.find("div",{"class":"field field-name-body field-type-text-with-summary field-label-hidden"}).text 5 publish_time = html.find("span",{"class":"uk-text-muted uk-text-small"}).text.split('|')[0] TypeError: **slice indices must be integers or None or have an __index__ method**
spartakos87 commented 7 years ago

I just ckeck it looks fine to me , can you send me the url which try to crawl? PS Its run with python3

fkolokathi commented 7 years ago

Yes, you're right...It was my fault.I didn't follow your instructions...I did not call function get_html at the beginning but I passed the url to every function of each website directly..Congratulations for your program!!!!!!

spartakos87 commented 7 years ago

Thnx a lot