Skip to content

Instantly share code, notes, and snippets.

@zodman
Created November 11, 2013 12:36
Show Gist options
  • Save zodman/7412565 to your computer and use it in GitHub Desktop.
Save zodman/7412565 to your computer and use it in GitHub Desktop.
scrapper mcani,e
from webscraping import download, xpath
import sys
D = download.Download()
src = ("crunchy","javascript")
def scrape(html):
for e in xpath.search(html,"//div[@class='release']"):
if "raw" in e.lower():
continue
links = xpath.search(e, "//span[@class='pad']/a/@href")
for i in links:
if not 'crunchyroll' in i and not 'javascript' in i:
print i
try:
if sys.argv[1]:
html = D.get(sys.argv[1])
scrape(html)
sys.exit(0)
except IndexError:
pass
for i in range(0,2):
html = D.get("http://www.mcanime.net/feeds/anime/%s" % i)
scrape(html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment