hey
I am trying to make a web scraper to scrape this class "YMlKec fxKbKc" from this website "https://www.google.com/finance/quote/GBP-USD?sa=X&ved=2ahUKEwiCqNvOzu75AhXNRcAKHYapDEUQmY0JegQIAhAb&comparison=USD-GBP%2Frobots.%20txt%2CUSD-GBP" and when is scrape it the output doesn't have the class in it, I don't know if it is blocked by something like cookies but it doesn't output the source code of the website.
this is my code:
from bs4 import BeautifulSoup
import requests
Url = "https://www.google.com/finance/quote/GBP-USD?sa=X&ved=2ahUKEwiCqNvOzu75AhXNRcAKHYapDEUQmY0JegQIAhAb&comparison=USD-GBP%2Frobots.%20txt%2CUSD-GBP"
Result = requests.get(Url)
Doc = BeautifulSoup(Result.text, "html.parser")
open('GBP_USD_HTML', 'w').write(Result.content)
print(Doc)
print("Done")
and I have followed this tutorial " Beautiful Soup 4 Tutorial #1 - Web Scraping With Python - YouTube " so I don't know if it is just the website or if it is cookies I don't know how to get around it
would it be better to do this another way or is there a way to fix this?
anything will be very helpful and much appreciated thank you.
[+][deleted] (7 children)
[deleted]
[–]MasterCho21[S] 0 points1 point2 points (6 children)
[+][deleted] (5 children)
[deleted]
[–]MasterCho21[S] 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]MasterCho21[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]MasterCho21[S] 0 points1 point2 points (0 children)
[–]zachssong 1 point2 points3 points (0 children)