web-scraping

python requests.get() returns an empty string

☆樱花仙子☆ 提交于 2021-02-04 21:31:48
问题 When I run the below code it returns an empty string url = 'http://www.allflicks.net/wp-content/themes/responsive/processing/processing_us.php?draw=5&columns[0][data]=box_art&columns[0][name]=&columns[0][searchable]=true&columns[0][orderable]=false&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=title&columns[1][name]=&columns[1][searchable]=true&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&columns[2][data]=year&columns[2]

Scraping dynamic content through Selenium?

你说的曾经没有我的故事 提交于 2021-02-04 19:46:25
问题 I'm trying to scrap dynamic content from a Blog through Selenium but it always returns un rendered JavaScript. To test this behavior I tried to wait till iframe loads completely and printed it's content which prints fine but again when I move back to parent frame it just displays un rendered JavaScript. I'm looking for something in which I'm able to print completely rendered HTML content from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium

Create new tab for each google search by selenium in excel VBA

别来无恙 提交于 2021-02-04 14:09:05
问题 I am trying to do google search based on some data in column A in Sheet1 .. and I need each cell content to be opened in new tab and do the search for that cell example: A1 has the word 'flower' so I expect to create a tab and navigate to google the do a search for that 'flower' then the next cell and so on and each search to be in a new tab Here's my try Sub Test() Dim bot As New ChromeDriver Dim Keys As New Keys bot.Get "https://www.google.com" 'search for items in column A bot

Create new tab for each google search by selenium in excel VBA

荒凉一梦 提交于 2021-02-04 14:08:30
问题 I am trying to do google search based on some data in column A in Sheet1 .. and I need each cell content to be opened in new tab and do the search for that cell example: A1 has the word 'flower' so I expect to create a tab and navigate to google the do a search for that 'flower' then the next cell and so on and each search to be in a new tab Here's my try Sub Test() Dim bot As New ChromeDriver Dim Keys As New Keys bot.Get "https://www.google.com" 'search for items in column A bot

Create new tab for each google search by selenium in excel VBA

怎甘沉沦 提交于 2021-02-04 14:07:53
问题 I am trying to do google search based on some data in column A in Sheet1 .. and I need each cell content to be opened in new tab and do the search for that cell example: A1 has the word 'flower' so I expect to create a tab and navigate to google the do a search for that 'flower' then the next cell and so on and each search to be in a new tab Here's my try Sub Test() Dim bot As New ChromeDriver Dim Keys As New Keys bot.Get "https://www.google.com" 'search for items in column A bot

Excel VBA to activate selectitem in web and go web for data

醉酒当歌 提交于 2021-02-04 08:10:26
问题 I'm very fresh to excel VBA. I tried use all potential solutions in the internet for activate selectitem in web and get data table but it didn't work. My Excel VBA code and Javascript is below. Sub GetQuarterFinancials() Dim ie As Object, URL As String URL = "https://www.marketwatch.com/investing/stock/aapl/financials" Set ie = CreateObject("internetexplorer.application") With ie .Visible = True .navigate URL Do While .Busy DoEvents Loop Do While .readyState <> 4 DoEvents Loop Set ticker = ie

How to download multiple files from a site selecting each option of a dropdown using Selenium in python

≯℡__Kan透↙ 提交于 2021-02-04 08:09:29
问题 I am trying to download multiple files from a site using Selenium in python using the following code. from selenium import webdriver import pandas as pd driver = webdriver.Chrome('chromedriver.exe') driver.maximize_window() driver.get('https://www10.goiania.go.gov.br/TransWeb/FuncionariosExportarPopUp.aspx?_=1590514086637') element = driver.find_element_by_id('WebPatterns_wt12_block_wtMainContent_wtcboReferencia') all_options = element.find_elements_by_tag_name("option") selectYear = Select

How to open the option items of a select tag (dropdown) in different tabs/windows?

北战南征 提交于 2021-02-04 07:09:06
问题 I'm trying to scrape this website using Python and Selenium, it requires you to select a date from drop-down box then click search to view the planning applications. URL: https://services.wiltshire.gov.uk/PlanningGIS/LLPG/WeeklyList. I have the code working to select the first index of the drop-down box and press search. How would I open multiple windows for all the date options in the drop-down box or go through them one by one so I can scrape it? from selenium import webdriver from selenium

How to open the option items of a select tag (dropdown) in different tabs/windows?

心已入冬 提交于 2021-02-04 07:08:30
问题 I'm trying to scrape this website using Python and Selenium, it requires you to select a date from drop-down box then click search to view the planning applications. URL: https://services.wiltshire.gov.uk/PlanningGIS/LLPG/WeeklyList. I have the code working to select the first index of the drop-down box and press search. How would I open multiple windows for all the date options in the drop-down box or go through them one by one so I can scrape it? from selenium import webdriver from selenium

StaleElementReferenceException even after adding the wait while collecting the data from the wikipedia using web-scraping

时间秒杀一切 提交于 2021-02-02 10:02:32
问题 I am a newbie to the web-scraping. Pardon my silly mistakes if there are any. I have been working on a project in which I need a list of movies as my data. I am trying to collect the data from the wikipedia using web-scraping. Following is my code for the same: def MoviesList(years, driver): for year in years: driver.implicitly_wait(150) year.click() table = driver.find_element_by_xpath('/html/body/div[3]/div[3]/div[5]/div[1]/table[2]/tbody') movies = table.find_elements_by_xpath('tr/td[1]/i