num_of_page = 40
other_vacancies = [] # остальные вакансии будут валиться сюда
collected_data = [
{'pattern': ['#c', 'c#','c#','.net','core'], 'result': [] },
{'pattern': ['ruby'], 'result': []},
{'pattern': ['python'], 'result': []},
{'pattern': ['php'], 'result': []},
{'pattern': ['java','jаva','Java'], 'result': []},
{'pattern': ['javascript','node'], 'result': []},
{'pattern': ['golang','разработчик go','go-разработчик','go','go разработчик'], 'result': []},
{'pattern': ['c++','с++'], 'result': []}
]
for i in range(num_of_page):
URL ="https://career.habr.com/vacancies?divisions[]=backend&page=" + str(i+1)+ "&type=all"
page = requests.get(URL)
soup = bs(page.text, "html.parser")
vacancies_names = soup.find_all('a', class_='vacancy-card__title-link')
for name in vacancies_names:
for data in collected_data:
pattern_found = False
if any([x in name.get_text().lower() for x in data['pattern']]):
data['result'].append(name.get_text())
pattern_found = True
break
if not pattern_found:
other_vacancies.append(name.get_text())
SELECT id_user FROM users WHERE id_user = '1;DELETE FROM users;'
Прозвоните контакты реле при подаче напряжения и без.