Commits

Jernej Virag committed 748e67f

Fixed solr endpoint

Comments (0)

Files changed (3)

scrapers/delo_scraper.py

             article["language"] = "si"
             article["id"] = get_hash(link)
             news.append(article)
-        print news
         return news
 
     def get_article_text(self, link):
 DB_CONNECTION_STRING = "postgresql://postgres:postgres@localhost/news"
 
 # Dictionary of endpoints; key is a language code, value is URL
-SOLR_ENDPOINT_URLS = { "si" : "http://localhost:8983/solr"}
+SOLR_ENDPOINT_URLS = { "si" : "http://localhost:8983/solr/news_buddy"}
 # Default endpoint to dispatch documents in languages without dedicated endpoint
 SOLR_DEFAULT_ENDPOINT = "si"
+import logging
 import scrapers
 import settings
 import db.news
     solr_int.commit()
 
 if __name__ == "__main__":
+    logging.basicConfig()
+
     existing_ids = db.news.get_latest_ids(1000)
     news = scrapers.scrape_news(existing_ids)
     db.news.store_news(news)