Last active
May 23, 2017 02:53
-
-
Save dr1nk0rdi3/dd1f7dda92947554271d44d3ad88d4e9 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
from bs4 import BeautifulSoup as bs | |
import re | |
import sys | |
p = requests.get("https://www.cinemark.com.br/sao-paulo/filmes/em-cartaz") | |
s = bs(p.content, "lxml") | |
prefix = "www.cinemark.com.br" | |
for i in range(1,100,3): | |
try: | |
found = s(attrs={'href':re.compile('^/filme/*')})[i]['href'] | |
print(prefix+found) | |
except: | |
print('bye =D') | |
sys.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment