Commit 626d62af by Guest User

Add new file

1 parent aaf1d7f1
Showing with 24 additions and 0 deletions
!/usr/bin/python
from bs4 import BeautifulSoup
import requests
import csv
import csv
from urllib import urlopen
import re
url = "https://github.com/apache/incubator-mxnet"
r = requests.get(url)
soup = BeautifulSoup(r.content,"html.parser")
Phrase = lambda tag: (getattr(tag, 'name', None) == 'a' and
'href' in tag.attrs and
'artificial-intelligence' in tag.get_text().lower())
results = soup.find_all(Phrase)
writer = csv.writer(open("pytest.csv", "wb"))
head = ("Title", "URL")
writer.writerow(results)
iterate=[]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!