<jupyter_start><jupyter_text>pagination<jupyter_code>lists = driver.find_element_by_css_selector('.Pagination')
btns = lists.find_elements_by_css_selector('.btn.Pagination-link')
len(btns)
script = '''function moveToNextPage(){
    var list = document.getElementsByClassName('Pagination')[0];
    var btns = list.getElementsByClassName('btn Pagination-link');
    var l = btns.length;
    b = btns[l-1];
    b.click();
}'''
driver.execute_script('window.moveToNextPage = '+ script)
driver.current_url
driver.execute_script('moveToNextPage()')
driver.current_url
btns[0].get_attribute('innerHTML')
flag = False
toClick = None
for i in range(len(btns)):
    print(i)
    
    b = btns[i]
    if (flag):
        print(b.get_attribute('class'))
        toClick = btns[i]
        break
    flag = 'is-active' in b.get_attribute('class')
toClick.get_attribute('innerHTML')
toClick.click()
b.click()
btn = driver.find_element_by_css_selector('.PageFreelancersDirectory-pagination-item:not[.is]:nth-child(7)')
btn.text
btn.click()
card = cards[0]<jupyter_output><empty_output><jupyter_text>Making function for card<jupyter_code>def scrapeCard(card):
    #name
    name =  card.find_element_by_css_selector('h3').text
    #tagline
    tagline = card.find_element_by_css_selector('div.user-tagline').text
    #country
    country = card.find_element_by_css_selector('img.flag-icon').get_attribute('title')
    
    
    cardStats = card.find_element_by_css_selector('.freelancer-card-stats')
    #rating
    span = cardStats.find_element_by_css_selector('span')
    rating = span.get_attribute('data-star_rating')
    #earningLabel
    earningLabel = card.find_element_by_css_selector('.Earnings-label.freelancer-user-earnings').text
    #reviews
    rev = cardStats.find_element_by_css_selector('span.Rating-review').text
    #hourly rate
    rate = cardStats.find_element_by_css_selector('.user-hourly-rate.freelancer-hourlyrate').text
    
    #description
    description = card.find_element_by_css_selector('.profile_text').text
    #Top Skills
    skills = card.find_element_by_css_selector('.top-skills').text
    #Profile Picture
    imgSrc = card.find_element_by_css_selector('.ImageThumbnail-image').get_attribute('src')
    
    return (name, tagline, country, cardStats, rating, earningLabel, rev, rate, description, skills, imgSrc)<jupyter_output><empty_output><jupyter_text>Name<jupyter_code>name =  card.find_element_by_css_selector('h3').text
name<jupyter_output><empty_output><jupyter_text>Tagline<jupyter_code>tagline = card.find_element_by_css_selector('div.user-tagline').text
tagline<jupyter_output><empty_output><jupyter_text>Country<jupyter_code>country = card.find_element_by_css_selector('img.flag-icon').get_attribute('title')
country
cardStats = card.find_element_by_css_selector('.freelancer-card-stats')<jupyter_output><empty_output><jupyter_text>Rating<jupyter_code>span = cardStats.find_element_by_css_selector('span')
rating = span.get_attribute('data-star_rating')<jupyter_output><empty_output><jupyter_text>Amount Earned<jupyter_code>earningLabel = card.find_element_by_css_selector('.Earnings-label.freelancer-user-earnings').text
earningLabel<jupyter_output><empty_output><jupyter_text>Reviews<jupyter_code>rev = cardStats.find_element_by_css_selector('span.Rating-review').text
rev<jupyter_output><empty_output><jupyter_text>Price<jupyter_code>rate = cardStats.find_element_by_css_selector('.user-hourly-rate.freelancer-hourlyrate').text
rate<jupyter_output><empty_output><jupyter_text>Description<jupyter_code>description = card.find_element_by_css_selector('.profile_text').text
description<jupyter_output><empty_output><jupyter_text>Top Skills<jupyter_code>skills = card.find_element_by_css_selector('.top-skills').text
skills<jupyter_output><empty_output><jupyter_text>Profile Picture<jupyter_code>imgSrc = card.find_element_by_css_selector('.ImageThumbnail-image').get_attribute('src')
imgSrc<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12696004046535153, 'fraction_numerical': 0.0017703591299949419, 'mean_word_length': 7.239583333333333, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '340374', 'license': 'MIT', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1384, 'n_words': 136, 'path': 'tempScript/testing/Untitled2.ipynb', 'repo_name': 'mkhuzaima/CS261F21PID39', 'size': '3954'}