i want to get GitHub repository links from GitHub search results. right now, my code gets links of both username and repository. how do i get only the repository links by targeting anchor tag attribute values.
my code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
path = "C:\programs\chromedriver.exe"
driver = webdriver.Chrome(path)
url = 'https://github.com/topics/flutter-apps'
driver.get(url)
links_list = []
headings = driver.find_elements_by_class_name('f3')
for heading in headings:
links = heading.find_elements_by_tag_name('a')
for l in links:
links_list.append(l.get_attribute('href'),)
print(links_list)
this is the code i want to get links from.
<h1 class="f3 text-gray text-normal lh-condensed">
<a data-hydro-click="{"event_type":"explore.click","payload":{"click_context":"REPOSITORY_CARD","click_target":"OWNER","click_visual_representation":"REPOSITORY_OWNER_HEADING","actor_id":49521558,"record_id":484656,"originating_url":"https://github.com/topics/ios","user_id":49521558}}"
data-hydro-click-hmac="7b69680b468dda1b4e10ddab19c8034fd4c530bc57957662d8be320d79cc38f1"
data-ga-click="Explore, go to repository owner, location:explore feed" href="/vsouza">
vsouza
</a> /
<a data-hydro-click="{"event_type":"explore.click","payload":{"click_context":"REPOSITORY_CARD","click_target":"REPOSITORY","click_visual_representation":"REPOSITORY_NAME_HEADING","actor_id":49521558,"record_id":21700699,"originating_url":"https://github.com/topics/ios","user_id":49521558}}"
data-hydro-click-hmac="c38ef14c5a72214b8e946bde857c36653301cb96a15a6b1108242526485221b8"
data-ga-click="Explore, go to repository, location:explore feed" href="/vsouza/awesome-ios" class="text-bold">
awesome-ios
</a>
</h1>
between the two anchor elements i want to get href value of anchor tag which has this attribute and value data-ga-click="Explore, go to repository, location:explore feed"