You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm sorry. My mistake. Here is the correct xpath:
//div[contains(text(), '30 Июля 2015')]
also the names of the months in Russian in order in two versions:
months = ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь']
or
months = ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря']
I meant that someone need to add a precise XPath target, using //div[contains(text())] or simply //div//text() would be bad for accuracy because random dates in a text are often irrelevant.
As for the months if you're interested you could add them to the extractor in a pull request.
The script does not find the date (Russian):
from htmldate import find_date
url = "https://kamaz.ru/press/releases/kamaz_i_skolkovo_sozdadut_ekologicheski_chistyy_gruzovik/"
print(find_date(url, extensive_search=True)) # Returns None
print(find_date(url, extensive_search=False)) # Returns None
Xpath selector of dates on the page: //div[contains(text(), 'July 30, 2015')]
The text was updated successfully, but these errors were encountered: