Skip to content

Commit 0e70de0

Browse files
authored
Update internshala-scraper.py (HarshCasper#1139)
1 parent afdd49f commit 0e70de0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Python/Internshala_Scrapper/internshala-scraper.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@
2626
"Content Writing Internship": "https://internshala.com/internships/content%20writing-internship",
2727
"Civil Internship": "https://internshala.com/internships/civil-internship",
2828
}
29-
x = 1
30-
for item in dict.keys():
31-
print(x, item)
32-
x += 1
29+
for index,item in enumerate(dict):
30+
print(index+1, item)
31+
3332
ch = int(input("Enter the categroy. eg 1 for Computer Science : "))
3433
url = dict[dict0[ch]]
3534
print("--------URL : " + url)
@@ -56,7 +55,7 @@
5655
locations = data.findAll("div", {"id": "location_names"})
5756
details = data.findAll("div", {"class": "internship_other_details_container"})
5857
links = data.findAll("a", {"class": "view_detail_button"})
59-
for x in range(0, len(companies)):
58+
for x in range(len(companies)):
6059
company = companies[x].text.strip()
6160
profile = profiles[x].text.strip()
6261
location = locations[x].text.strip()
@@ -75,4 +74,4 @@
7574
info.append(extracted[5])
7675
info.append(link)
7776
writer.writerow(info)
78-
input("Done!\nAll the best ;-)")
77+
print("Done!\nAll the best ;-)")

0 commit comments

Comments
 (0)