GithubHelp home page GithubHelp logo

yutkin / lenta.ru-news-dataset Goto Github PK

View Code? Open in Web Editor NEW
140.0 140.0 25.0 15 KB

Corpus of Russian news articles collected from Lenta.Ru

Python 100.00%
asynchronous asyncio corpus dataset lenta lenta-ru news nlp parser python russian

lenta.ru-news-dataset's People

Contributors

yutkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lenta.ru-news-dataset's Issues

asyncio SSL error in data received

Python 3.7,aiohttp==3.4.4. Возникла ошибка:
11-01-2019 18:51:24 - asyncio - ERROR @ Task exception was never retrieved
aiohttp.client_exceptions.ClientOSError: [Errno 1] [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2592). Полностью не скопировал ошибку.

Программа заработала после следующих манипуляций:

  1. import uvloop
    asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

  2.     self._read_timeout = 20
     self._conn_timeout = 20
    
  3. self._connector = aiohttp.TCPConnector(
    use_dns_cache=True, ttl_dns_cache=60 * 60, limit=512, ssl=False)

  4. Обновил aiohttp до 4-й версии.

Ошибка сопоставления url и новости

 | tags | text | title | topic | url
0 | Общество | Миллиардер Илон Маск в резкой форме ответил бр... | Илон Маск назвал педофилом спасавшего детей из... | Мир | https://lenta.ru/news/2018/07/16/su57/

по данному урл совершенно другая новость, та же ошибка на всех следующих записях

Some Errors

concurrent.futures.process._RemoteTraceback: 

"""

Traceback (most recent call last):

  File "/usr/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker

    r = call_item.fn(*call_item.args, **call_item.kwargs)

  File "download_lenta.py", line 71, in parse_article_html

    topic = doc_tree.find("a", "b-header-inner__block").get_text()

AttributeError: 'NoneType' object has no attribute 'get_text'

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "download_lenta.py", line 98, in fetch_all_news_on_page

    processed_artile = future.result()

  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result

    return self.__get_result()

  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result

    raise self._exception

AttributeError: 'NoneType' object has no attribute 'get_text'
16-07-2018 10:19:33 - LentaParser - ERROR @ Error while processing https://lenta.ru/news/2014/06/19/s5prime/

concurrent.futures.process._RemoteTraceback: 

"""

Traceback (most recent call last):

  File "/usr/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker

    r = call_item.fn(*call_item.args, **call_item.kwargs)

  File "download_lenta.py", line 67, in parse_article_html

    paragraphs = doc_tree.find("div", attrs={"itemprop": "articleBody"}).find_all(

AttributeError: 'NoneType' object has no attribute 'find_all'

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "download_lenta.py", line 98, in fetch_all_news_on_page

    processed_artile = future.result()

  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 425, in result

    return self.__get_result()

  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result

    raise self._exception

AttributeError: 'NoneType' object has no attribute 'find_all'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.