Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get an error message when trying to run this script!! #1

Open
ebamgithub opened this issue Mar 4, 2019 · 10 comments
Open

I get an error message when trying to run this script!! #1

ebamgithub opened this issue Mar 4, 2019 · 10 comments

Comments

@ebamgithub
Copy link

I get an error message when trying to run this script!!

@chudnov
Copy link
Owner

chudnov commented Mar 4, 2019

Please elaborate on the issue...

@ebamgithub
Copy link
Author

Ok will elaborate, and try to post a screenshot of the message if that helps...(give me a couple of hours).

@ebamgithub
Copy link
Author

I decided the best way to explain is to say Bs4 isn't working and I will upload a video here of me trying to run the script ( as I am a bit of a noob).

https://youtu.be/wzqPnY5oV18

Here is the link to the video screenshot of me trying to operate it,

@ebamgithub
Copy link
Author

Actually I got selenium running Now:

I get Traceback (most recent call last):
File "C:\Users\ebam_\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 297, in bootstrap
self.run()
File "C:\Users\ebam
\AppData\Local\Programs\Python\Python37\lib\multiprocessing\process.py", line 99, in run
self.target(*self.args, **self.kwargs)
File "C:\Users\ebam
\AppData\Local\Programs\Python\Python36-32\EB-test-scripts\costco-scrape-master\costco-scrape-master\scrape.py", line 153, in run
load_data(driver)
File "C:\Users\ebam
\AppData\Local\Programs\Python\Python36-32\EB-test-scripts\costco-scrape-master\costco-scrape-master\scrape.py", line 43, in load_data
extract_and_load_all_data(soup)
File "C:\Users\ebam
\AppData\Local\Programs\Python\Python36-32\EB-test-scripts\costco-scrape-master\costco-scrape-master\scrape.py", line 130, in extract_and_load_all_data
"Meta tags": get_meta_tags(soup),
File "C:\Users\ebam_\AppData\Local\Programs\Python\Python36-32\EB-test-scripts\costco-scrape-master\costco-scrape-master\scrape.py", line 61, in get_meta_tags
meta_tags = [tags.get('name') + " is " + tags.get('content') for tags in soup.find_all('meta')[3:8]]
File "C:\Users\ebam_\AppData\Local\Programs\Python\Python36-32\EB-test-scripts\costco-scrape-master\costco-scrape-master\scrape.py", line 61, in
meta_tags = [tags.get('name') + " is " + tags.get('content') for tags in soup.find_all('meta')[3:8]]
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

as an error message. I will upload the second video of my correction ( i was making a mistake when running the file initially as shown in the first video...

( This is the actual error i had yesterday).

@ebamgithub
Copy link
Author

screenshot error

https://youtu.be/QonhNDoU2e0

here is the video of me attempting it, as we can see selenium loads but some error occurs.

@chudnov
Copy link
Owner

chudnov commented Mar 6, 2019

Costco most likely changed the format of their website since I last wrote the code. This completely breaks the script.

@ebamgithub
Copy link
Author

ebamgithub commented Mar 6, 2019 via email

@chudnov
Copy link
Owner

chudnov commented Mar 6, 2019

I finished writing it Jul 16, 2018. The logic is simply to use Selenium as a webdriver, and then use beautifulsoup to access the html tags of the page for the exact values that you want (will differ for every page). Thats it!

@ebamgithub
Copy link
Author

ebamgithub commented Mar 6, 2019 via email

@ebamgithub
Copy link
Author

Hmmn I am struggling with this, do you use skype or discord or telegram and you could give me some hints about how to update the code coming from the perspective that I am a bit of a noob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants