Python Forum
Paste data from a list to a webform
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paste data from a list to a webform
#1
Lightbulb 
Hello guys,

I'm using the following code in order to collect some information from a website.
import zapimoveis_scraper as zap
import pandas as pd
 
result  = zap.search(localization="sp+sao-paulo", acao="aluguel", tipo="loja-salao", num_pages=5) 

ofertas = len(result)
print(ofertas)

df = pd.DataFrame([], columns=['Address', 'Price', 'Total Area', 'Bathrooms', 'Badrooms', 'Vacancies', 'Description'])

for i in range(ofertas):
    df = df.append({'Address': result[i].address, 'Price': result[i].price, 'Total Area': result[i].total_area_m2, 'Bathrooms': result[i].bathrooms, 'Badrooms':result[i].bedrooms, 'Vacancies':result[i].vacancies, 'Description':result[i].description}, ignore_index=True)

df.to_csv (r'C:\Users\bruno\Desktop\FII\Zap.csv', index = False, header=True, sep=';', encoding='utf-8-sig')
print(df)
And now, I would like to paste just the "column" Address from df on the field "input" of the following website: https://geocode.localfocus.nl/

Using the following code I can write my name on the field input,
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select


driver = webdriver.Chrome('C:/bin/chromedriver.exe')
driver.get("https://geocode.localfocus.nl/")
select = Select(driver.find_element_by_id('boundary'))
select.select_by_visible_text("Brazil")

driver.find_element_by_id("input").send_keys('Bruno')
How can I write all information from Address on the field "input"?

Thank you
buran write Mar-19-2021, 01:27 PM:
I moved the thread to Web Development and Web Scrapping section of the forum.
Reply


Messages In This Thread
Paste data from a list to a webform - by brunolelli - Mar-19-2021, 01:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Copy & Paste Web Page ian 2 8,467 Dec-24-2018, 04:56 PM
Last Post: ian

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020