web-scraping

How to access frame with python selenium

我只是一个虾纸丫 提交于 2020-12-13 11:59:46
问题 I am trying to fill a form on an html page that I believe is contained within a frame. The relevant portion of the html looks like this: <frameset rows="*" cols="*,183" frameborder="NO" border="0" framespacing="0"> <frameset rows="61,28,*,0,0" cols="*" frameborder="NO" border="0" framespacing="0"> <frame src="fr1_tab1.jhtml?NUM1=1462489510565" scrolling="NO" noresize name="frame1" title="page header - navigation"> <frame src="fr4_top.jhtml?NUM1=1462489510565" scrolling="NO" noresize name=

Why I'm getting “UnicodeEncodeError: 'charmap' codec can't encode character '\u25b2' in position 84811: character maps to <undefined>” error?

别来无恙 提交于 2020-12-13 04:06:12
问题 I'm getting UnicodeEncodeError: 'charmap' codec can't encode character '\u200b' in position 756: character maps to error while running this code:: from bs4 import BeautifulSoup import requests r = requests.get('https://stackoverflow.com').text soup = BeautifulSoup(r, 'lxml') print(soup.prettify()) and the output is: Traceback (most recent call last): File "c:\Users\Asus\Documents\Hello World\Web Scraping\st.py", line 5, in <module> print(soup.prettify()) File "C:\Users\Asus\AppData\Local

Beautifulsoup Python Youtube Scrape not working

空扰寡人 提交于 2020-12-13 04:04:11
问题 I'm trying to scrape Youtube URLs + Title from youtube accounts which are formatted like https://www.youtube.com/c/%s/videos %accountName . for example Apple The class given to the clickable text (title) in Youtube is ytd-grid-video-renderer #video-title.yt-simple-endpoint.ytd-grid-video-renderer - When clicking on the title object in inspector mode (Firefox) I am not getting any results, but the url ' url ' (somewhere in webCommandMetadata ) and title ' simpleText ' are showing in the

Python Requests_html: giving me Timeout Error

痞子三分冷 提交于 2020-12-13 03:37:22
问题 I'm trying to scrape headlines from medium.com by using this library called requests_html The code I'm using works well on other's PC but not mine. Here's what the original code looks like this: from requests_html import HTMLSession session = HTMLSession() r = session.get('https://medium.com/@daranept27') r.html.render() x = r.html.find('a.eg.bv') [print(elem.text) for elem in x] It gives me pyppeteer.errors.TimeoutError: Navigation Timeout Exceeded: 8000 ms exceeded. Here's the full error:

AttributeError while scraping

≯℡__Kan透↙ 提交于 2020-12-13 03:35:23
问题 I am trying to scrape a website, I have got this error: AttributeError: 'NoneType' object has no attribute 'text' at ---> 12 for x in soup.select("div.site-content")] The code used is: rq = req.get("https://stopcensura.net/category/cronaca") soup = BeautifulSoup(rq.content, 'html.parser') scrape_info = [(x.h3.a.text, x.time.text) for x in soup.select("div.site-content")] I would like to get infnormation on title ( entry-title ), date ( class="date" ), the author ( <div class="by-author vcard

Selenium calendar picker: I can click manually but Selenium cant click

余生长醉 提交于 2020-12-13 03:25:44
问题 I am attempting to choose date on a calendar on this website. On the first calendar (date from) I can choose the desired date using Selenium, however, I get the following error while clicking on the desired month even though the exact element is found. ElementNotInteractableException:element not interactable To me, it seems weird because I can click on the month manually. Here is what I have tried so far from selenium import webdriver import time year = 2019 month = 'JAN' driver_path =

Selenium calendar picker: I can click manually but Selenium cant click

…衆ロ難τιáo~ 提交于 2020-12-13 03:21:46
问题 I am attempting to choose date on a calendar on this website. On the first calendar (date from) I can choose the desired date using Selenium, however, I get the following error while clicking on the desired month even though the exact element is found. ElementNotInteractableException:element not interactable To me, it seems weird because I can click on the month manually. Here is what I have tried so far from selenium import webdriver import time year = 2019 month = 'JAN' driver_path =

Selenium calendar picker: I can click manually but Selenium cant click

跟風遠走 提交于 2020-12-13 03:21:25
问题 I am attempting to choose date on a calendar on this website. On the first calendar (date from) I can choose the desired date using Selenium, however, I get the following error while clicking on the desired month even though the exact element is found. ElementNotInteractableException:element not interactable To me, it seems weird because I can click on the month manually. Here is what I have tried so far from selenium import webdriver import time year = 2019 month = 'JAN' driver_path =

Web scraping with Selenium not capturing full text [closed]

久未见 提交于 2020-12-13 03:04:05
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . Improve this question I'm trying to mine quite a bit of text from a list of links using Selenium/Python. In this example, I scrape only one of the pages and that successfully grabs the full text: page = 'https://xxxxxx.net/xxxxx/September%202020/2020-09-24' driver = webdriver.Firefox() driver.get(page)

Web scraping with Selenium not capturing full text [closed]

♀尐吖头ヾ 提交于 2020-12-13 03:03:06
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last month . Improve this question I'm trying to mine quite a bit of text from a list of links using Selenium/Python. In this example, I scrape only one of the pages and that successfully grabs the full text: page = 'https://xxxxxx.net/xxxxx/September%202020/2020-09-24' driver = webdriver.Firefox() driver.get(page)