This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
driver = webdriver.Chrome() | |
# Primero loguearme. | |
# url = 'https://www.linkedin.com/login/es |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="pagination mb-0"> | |
{% if page_obj.has_previous %} | |
<li class="page-item"> | |
<a id="previous-page" class="page-link" href="#" aria-label="Previous">{% trans 'Previous' %}</a> | |
</li> | |
{% else %} | |
<li class="page-item disabled"> | |
<span class="page-link">{% trans 'Previous' %}</span> | |
</li> | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.translation import gettext_lazy as _ | |
COUNTRIES_CHOICES = [ | |
('AF', _('Afghanistan')), ('AX', _('Åland Islands')), ('AL', _('Albania')), | |
('DZ', _('Algeria')), ('AS', _('American Samoa')), ('AD', _('Andorra')), | |
('AO', _('Angola')), ('AI', _('Anguilla')), ('AQ', _('Antarctica')), | |
('AG', _('Antigua and Barbuda')), ('AR', _('Argentina')), ('AM', _('Armenia')), | |
('AW', _('Aruba')), ('AU', _('Australia')), ('AT', _('Austria')), | |
('AZ', _('Azerbaijan')), ('BS', _('Bahamas')), ('BH', _('Bahrain')), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECRET_KEY = 'super-secret-key' | |
INSTALLED_APPS = [ | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import html | |
import requests | |
def get_stock_finantial_data(symbol): | |
url = 'https://finance.yahoo.com/quote/{symbol}/' | |
r = requests.get(url.format(symbol=symbol)) | |
tree = html.fromstring(r.content) | |
to_search = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cssselect | |
from lxml import html | |
import requests | |
def get_stock_news(symbol): | |
url = 'https://www.bloomberg.com/quote/{symbol}:US' | |
r = requests.get(url.format(symbol=symbol)) | |
tree = html.fromstring(r.content) |