I'm trying to make web scraping with Python 3.10, and the library requests-HTML 0.10.0.
I attach the code:
from requests_html import HTMLSession
url = '
https://bodysolid-europe.com/collections/all'
/>
s = HTMLSession()
r = s.get(url)
r.html.render(sleep=1)
products = r.html.xpath('/html/body/div[2]/div[2]/div', first=True)
for item in products.absolute_links:
r = s.get(item)
print(r.html.find('header.product-header', first=True).text)
When I try to extract information from the URL by Xpath, in the console shows the next output:
[D:urllib3.connectionpool] Starting new HTTPS connection (%d): %s:%s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:asyncio] Using proactor: %s
[D:websockets.client] = connection is CONNECTING
[D:websockets.client] > GET %s HTTP/1.1
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] > %s: %s
[D:websockets.client] < HTTP/1.1 %d %s
It doesn't show all the information from the items, only a little bit, like these:
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Body-Solid Europe
Best Fitness Dumbbell Rack BFDR10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Bench BFFID10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Mountain Climber BFMC10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Body-Solid Europe
Best Fitness Multi-Station Gym BFMG30
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Center Drive Elliptical BFE1
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Olympic Bench BFOB10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Functional Trainer BFFT10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Leg Developer and Preacher Curl Attachment BFPL10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Best Fitness
Best Fitness Inversion Table BFINVER10
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
[D:urllib3.connectionpool] %s://%s:%s "%s %s %s" %s %s
Body-Solid Europe
The most of the output are only:
D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
[D:websockets.client] < %s
I don't know what the problem is. I already installed the pyppeteer==1.0.0, because previously, I had this:
NoSuchKey. The specified key does not exist. No such object: chromium-browser-snapshots/Win_x64/1181205/chrome-win.zip
but now it's showing the "[D:websockets.client] < %s
[D:websockets.client] < %s"
I need to fix that error with the output to get the information from the URL by web scraping.
Python Web scraping [D:websockets.client] > GET %s HTTP/1.1 [D:websockets.client] > %s: %s doesn't show all the results
Programing Coderfunda
September 06, 2024
No comments
Related Posts:
Can we implement tap and pay with NFC in apple without using Apple Pay?I want to implement tap and pay with an IOS device...But couldn't-find any good resources for doing this... There is plenty of resources for Android b… Read More
Convert Numbers to Words in Laravel with SpellNumberSpellNumber is a package to convert words in Laravel easily using the PHP INTL extension. The post Convert Numbers to Words in Laravel with SpellNu… Read More
Bolt is a Laravel Form Builder for the TALL StackBolt is a Laravel form builder for your users, made with Filament and the TALL stack. It enables your users to create custom forms with many configura… Read More
Infrastructure management for several high-traffic PHP applicationssubmitted by /u/themsaid [link] [comments]… Read More
dynamically open dropdown in vuehow do i open up a dynamically created dropdown using native vue and javascript? {{item}} under my methods i have tried these to no avail:… Read More
0 comments:
Post a Comment
Thanks