Comments (12)
@sumant4ssm thank you for pointing out the issue.
Currently i am not well so i will try to fix it in few days.
If possible comment the latest get file name function and uncomment the previous one present just above.
from educative.io_scraper.
@paletikoushik In my testing, i am not receiving this error.
Please answer the following?
Have you created a virtual env?
If yes, then did you install the modules from requirements.txt in your virtual env?
In my tool, I am using python-slugify instead of slugify. Maybe that is causing some issues.
One more note I should add, there is a bug in file naming as well. I will fix it today.
from educative.io_scraper.
running the commands with
python chromedriver.py
python educative_scraper.py instead of python3 chromedriver.py..... solved my issue it asked for selenium and slugify and i used python-slugify it worked like charm thanks for the scraper and many many thanks for your support.
from educative.io_scraper.
Hi @anilabhadatta , I am having the same issue, how do we fix it?
from educative.io_scraper.
Alright, I am not a Python expert but I debugged this problem and found the problem was with the below code
print("Getting File Name")
meta_script_selector = "script[type='application/ld+json']"
metadata = driver.find_elements( By.CSS_SELECTOR, meta_script_selector)[0].get_attribute('innerHTML')
metadata = json.loads(metadata)
if course_folder:
file_name = metadata['name']
Just note this line
metadata = driver.find_elements( By.CSS_SELECTOR, meta_script_selector)[0].get_attribute('innerHTML')
It uses the 0th
element but in my case, it was 1st
element( Found out after looking through the sources)
Changing the previous line to the below line fixes the problem
metadata = driver.find_elements( By.CSS_SELECTOR, meta_script_selector)[1].get_attribute('innerHTML')
I am not sure it's always one, but the one solution I could think of is to look through all the array elements if there is no name
found.
by the way, @anilabhadatta , Thank you for this tool.
from educative.io_scraper.
thanks @anilabhadatta . It was an easy fix and was able to fix it.
from educative.io_scraper.
@sumant4ssm thank you for pointing out the issue. Currently i am not well so i will try to fix it in few days. If possible comment the latest get file name function and uncomment the previous one present just above.
after commenting getting below error any help is greatly appreciated
ad Webpage Function
Checking Login Function
Checking for captcha Function...
Create Course Folder Function
Getting File Name
File Name Found
Found Issue, Going Next Course slugify() got an unexpected keyword argument 'replacements'
Script Execution Complete
from educative.io_scraper.
@zerohope @sumant4ssm @paletikoushik Test it now, should be fixed. Clone the repo again in a fresh location.
from educative.io_scraper.
cloned the repo again in fresh location still getting below error, any help is greatly appreciated sir.
Driver Loaded
[Selected config: 0] Starting Scraping: 0, https://www.educative.io/courses/decode-coding-interview-cpp/qABQKQqWmmk
Load Webpage Function
Checking Login Function
Checking for captcha Function...
Create Course Folder Function
Getting File Name
File Name Found
Found Issue, Going Next Course slugify() got an unexpected keyword argument 'replacements'
from educative.io_scraper.
Ok sir, so I made mistake
after install requirements.txt I got selenium missing.
I did pip3 install selenium and after that got slugify missing and I used pip3 install slugify, so that is creating the problem sir now how to solve this issue sir. I tried to uninstall it by pip3 uninstall slugify and installing pip3 install python-slugify still getting same error. I tested it on mac and its working fine (as that was first time i got same error like selenium missing and slugify missing and I installed pip3 install python-slugify and its working. What should I do on my windows laptop any help is greatly appreciated.
from educative.io_scraper.
@paletikoushik can you share your screen? Send me a meet link and ping me up
from educative.io_scraper.
Welcome.
from educative.io_scraper.
Related Issues (20)
- Found Issue, Going Next Course Message: Script Timeout HOT 22
- Chrome auto-update itself? HOT 4
- Not sure how to use it HOT 6
- Terrible documentation HOT 7
- local variable 'driver' referenced before assignment HOT 8
- Unable to locate element HOT 1
- no such element: Unable to locate element: HOT 16
- So difficult to use HOT 1
- Found Issue, Going Next Course too many values to unpack (expected 2) HOT 2
- I solved the problem of creating folders name with symbols like '?:\' HOT 3
- Found Issue, Going Next Course Message: no such element: Unable to locate element: {"method":"css selector","selector":"h4"} HOT 10
- hi @anilabhadatta after adding the above driver able to login but the scrapper fails on the first page: HOT 2
- Handle Quiz just like Slides HOT 9
- Message: stale element reference: element is not attached to the page document HOT 19
- Unreadable text in some pages HOT 3
- This version of ChromeDriver only supports Chrome version 98 HOT 2
- Main Exception Message: unknown error: Chrome failed to start: exited abnormally. HOT 10
- Script is Increasing the VDI size in the BackGround while scrapping the files. HOT 3
- Add case to handle mini project pages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from educative.io_scraper.