pip install requestsimport requests
ModuleNotFoundError: No module named 'requests'
I ran this code with help of a friend.import requests from lxml.html import fromstring import lxml.html header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36', 'Accept-Language': 'en-US,en;q=0.9', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' } query = 'weight loss tips' response = requests.get(f'https://www.google.com/search?q={query}&start=0', headers=header).text tree = lxml.html.fromstring(response) node = tree.xpath('//@data-q') print(node)
There is no limitations in the code as I can see, it was the result for this query:I ran this code with help of a friend.
The queries returns only 4 results. Is that the limitation of this or do I have to modify something in order to get more questions scraped per query?
pip install requestsimport requests
ModuleNotFoundError: No module named 'requests'
You should install "Requests" Module open just type "python pip install requests" , you can watch a video how to do that in youtube , i'm building a tool right now for this matterimport requests
ModuleNotFoundError: No module named 'requests'
Can You modify it, so it also grabs the answers?Will design UI, compile and share .exe here soon.
did you do it?Will design UI, compile and share .exe here soon.
Please Do for meThat a nice code but your ip will be blocked after too many requests even when you are rotating user agents you need to use proxies at least , i can design user friendly interface for it with the nessecarry adjustement (for free ofcourse) if you guys interested
I already did it , it took me 2h straight to complete whole GUI project , i didn't change anything iam_ironman script (credit to him) i just build GUI around itPlease Do for me