Skip to content

Instantly share code, notes, and snippets.

@dr1nk0rdi3
Last active May 23, 2017 02:53
Show Gist options
  • Save dr1nk0rdi3/dd1f7dda92947554271d44d3ad88d4e9 to your computer and use it in GitHub Desktop.
Save dr1nk0rdi3/dd1f7dda92947554271d44d3ad88d4e9 to your computer and use it in GitHub Desktop.
#!/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