problem with the library named requests_html in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

problem with the library named requests_html in python

see the code; Code link:https://code.sololearn.com/cEH7fyfQbLO4/#py list2.txe link:https://pastebin.com/raw/ZTbhiWAF When i run code without for loop it is working fine but when i run code with "for" loop it returns "<Response 404>" help me plz

24th May 2020, 11:44 AM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar
4 Answers
+ 2
OK, finally i got it this problem because, i am reading lines(file.readlines()) and it return "\n" character in url so my final url becomes "https://domain.com/b"+"\n and i got [<Response 404>]
25th May 2020, 1:41 PM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar
+ 2
Well, the 404 error is simply "Page not found", so perhaps one of your URLs is not valid.
24th May 2020, 11:51 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
at.ul Make sure the links are valid and print them out -- maybe there is something wrong with string concatenation or simply the page has changed/moved.
24th May 2020, 12:05 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
- 1
@Kuba Siekierzyński but link is valid
24th May 2020, 11:56 AM
𝖆𝖙.𝖚𝕷
𝖆𝖙.𝖚𝕷 - avatar