Skip to content

Instantly share code, notes, and snippets.

View montenegrodr's full-sized avatar
🏠
Working from home

Robson Montenegro montenegrodr

🏠
Working from home
  • Berlin
View GitHub Profile
from vowpalwabbit import pyvw
def to_vw(clf, text, str_labels):
vw_example = str('{} |f {} '.format(str_labels, text))
return clf.example(vw_example)
clf = vw = pyvw.vw(
loss_function='logistic', oaa=2,
link='logistic', raw_predictions='output.txt'
)
import requests
from letmecrawl import letmecrawl
for proxy in letmecrawl.letmecrawl():
response = requests.get(
url='http://ifconfig.co/json',
proxies={'http': str(proxy)}
)
print response.content
@montenegrodr
montenegrodr / letmecrawl
Created February 25, 2018 19:46
Web Scraping sem ser bloqueado
import requests
from letmecrawl import letmecrawl
for proxy in letmecrawl.letmecrawl():
response = requests.get(
url='http://ifconfig.co/json',
proxies={'http': str(proxy)}
)
print response.content
@montenegrodr
montenegrodr / letmecrawl.py
Created February 25, 2018 19:47
Web Scraping sem ser bloqueado
import requests
from letmecrawl import letmecrawl
for proxy in letmecrawl.letmecrawl():
response = requests.get(
url='http://ifconfig.co/json',
proxies={'http': str(proxy)}
)
print response.content
@montenegrodr
montenegrodr / letmecrawl.py
Created February 25, 2018 19:49
Web Scraping sem ser bloqueado
import requests
from letmecrawl import letmecrawl
for proxy in letmecrawl.letmecrawl():
response = requests.get(
url='http://ifconfig.co/json',
proxies={'http': str(proxy)}
)
print response.content
@montenegrodr
montenegrodr / letmecrawl.py
Created February 26, 2018 09:27
LetMeCrawl — Web Scraping sem ser bloqueado
import requests
from letmecrawl import letmecrawl
for proxy in letmecrawl():
response = requests.get(
url='http://ifconfig.co/json',
proxies={'http': str(proxy)}
)
print response.content