code doesn't work because of one line | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

code doesn't work because of one line

I'm writing a bot at the moment which you give a keyword and it search on wikipedia for that keyword. After the search, all the text is put in a file. My problem is, that after opening the keyword-article, i can't send a requests. It's a bit difficult to explain, so please feel free to check the code by yourself(doesn't work on Sololearn yet, so you might need to create a new file on you desktop): https://code.sololearn.com/ca125a16a16a

8th Dec 2020, 1:23 PM
Leuck Chris
Leuck Chris - avatar
3 Answers
+ 1
The copied link isn't recognised by the request on line 29, because on line 26 the print() function assigns None to z .
9th Dec 2020, 2:09 AM
Vitaly Sokol
Vitaly Sokol - avatar
+ 1
You Can't Use Pyautogui in Sololearn! Pyautogui Needs Permission To Control Your System, Which is Not Granted By The Browser For Security Reasons... So, It's No Point Installing Pyautogui Online. So, Sololearn Gives An Error. Note: You Can Use Pyautogui On Python (Installed On PC); You Also Can't Use Pyautogui on Android...
1st Aug 2021, 11:05 AM
Sancho Godinho
Sancho Godinho - avatar
0
Yes, that was my problem. I think I found a solution by using Wikipedia's API
9th Dec 2020, 5:08 AM
Leuck Chris
Leuck Chris - avatar