Skip to content

Instantly share code, notes, and snippets.

@moniquelive
Created March 17, 2021 02:04
Show Gist options
  • Save moniquelive/6d40834e6e75ccb6a9a50cbac15df7ad to your computer and use it in GitHub Desktop.
Save moniquelive/6d40834e6e75ccb6a9a50cbac15df7ad to your computer and use it in GitHub Desktop.
Scrapes br.op.gg in order to download last 10 victories of "onde fica jungle"
#!/usr/bin/env python
import urllib.request
from bs4 import BeautifulSoup
url = 'https://br.op.gg/summoner/userName=onde+fica+jungle'
with urllib.request.urlopen(url) as u:
doc = BeautifulSoup(u, 'html.parser')
game_results = doc.select('.GameResult')
for i, r in enumerate(game_results):
print("%2d. %s" % (i+1, r.text.strip()))
@moniquelive
Copy link
Author

To install BeautifulSoup lib: pip install bs4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment