반응형
from bs4 import BeautifulSoup
import requests
server = "https://github.com"
url = server + "/~~~path~~~/pulls"
request = requests.get(url)
result = request.text
# f = open("d:/program/python/result.txt", "r", encoding="utf-8")
# result = f.read()
# f.close()
soup = BeautifulSoup(result, "html.parser")
# pulls
# issues
for item in soup.select("div.flex-auto.min-width-0.p-2.pr-3.pr-md-2 a.Link--primary.v-align-middle.no-underline.h4.js-navigation-open.markdown-title"):
print(server + item["href"], item.get_text())
반응형
댓글